VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: okewaja on May 19, 2016, 11:51:46 AM

Title: Category Description - Fancybox/Lightbox image
Post by: okewaja on May 19, 2016, 11:51:46 AM
Hi,
I would like to add image to category description and link it to fancybox/light box. What html should I put in image link for that?

I've been using rel="lightbox" so far for that. But it seems not to work in new Joomla :(. The vm jquerry is turned on in VM config.

example link: http://miden.com.pl/sklep/as-creation-jungle

Joomla! 3.5.1 Stable [ Unicorn ] 05-April-2016 22:45 GMT
PHP Version 5.6.4-0+tld0
Title: Re: Category Description - Fancybox/Lightbox image
Post by: Ghost on May 19, 2016, 12:26:50 PM
You don't have lightbox JS loaded, so rel="lightbox" won't work.

For Fancybox you need to define a selector to be used. E.g. you can keep rel="lightbox" and add this JS code somewhere. In a JS file or somewhere on the page:

jQuery(document).ready(function() {
jQuery("[rel=lightbox]").fancybox({});
});