Keyword

Pop up images

  • politicaldoubts
  • politicaldoubts's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 1 week ago #157950 by politicaldoubts
Pop up images was created by politicaldoubts
Hallo!

Images in my fulltext dont open in pop up, althouth i have add to them an <a class="modal" rel="{handler: 'image'}" href="...">

An example -> www.politicaldoubts.com/thrace/item/1007-anatoliki-makedonia-thraki-ora-gia-anaptyksi

What i am doing wrong;

Is it possible to add classes automatically to every image in fulltext, and not do it manually every time; With jquery code for example;

Thanks for your time!

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 week ago #157976 by Krikor Boghossian
Replied by Krikor Boghossian on topic Pop up images
Hello the script does not get triggered this way.
You can use jQuery's wrap() for all of the images and then calling the lightbox. I would suggest however not using Squeezebox and using the new syntax
<a data-k2-modal="image" ...

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • politicaldoubts
  • politicaldoubts's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 1 week ago #157990 by politicaldoubts
Replied by politicaldoubts on topic Pop up images
thanks! that worked!!! i ll try now the jquery code and i hope that it ll works too,

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 week ago #157993 by Krikor Boghossian
Replied by Krikor Boghossian on topic Pop up images
Let me know how it went.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • politicaldoubts
  • politicaldoubts's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 1 week ago #158022 by politicaldoubts
Replied by politicaldoubts on topic Pop up images
i used the following code:

<script>
(function ($) {
$(".itemFullText img").each(function() {
var src = $(this).attr('src');
var a = $('<a/>').attr({href: src, 'data-k2-modal': 'image'})
$(this).wrap(a);
});
})(jQuery);
</script>

and it worked fine! thanks for your help!

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 week ago #158025 by Krikor Boghossian
Replied by Krikor Boghossian on topic Pop up images
Great news buddy :)
Nice to be of assistance.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum