Note that there are some explanatory texts on larger screens.

plurals
  1. POFancybox2 clickable image using captions
    primarykey
    data
    text
    <p>I would like to make some images clickable to a website in Fancybox2. I copied code from this example: <a href="http://jsfiddle.net/w6p49/" rel="nofollow">http://jsfiddle.net/w6p49/</a><br /><br /> It works exactly the way I want except I'm using captions instead of titles. I copied the code from here :<a href="http://jsfiddle.net/vkDcG/" rel="nofollow">http://jsfiddle.net/vkDcG/</a><br /><br /> My code</p> <pre><code>//Launch website URLS $("#client-url").click(function() { $.fancybox.open([ { href: 'http://xyz.com/images/portfolio/brand/client3/01.jpg', link: 'http://www.clientwebsite.com' }, { href: 'http://xyz.com/images/portfolio/brand/client3/02.jpg', link: 'http://www.clientwebsite.com' }, { href: 'http://xyz.com/images/portfolio/brand/client3/03.jpg', link: 'http://www.clientwebsite.com' }, { href: 'http://xyz.com/images/portfolio/brand/client3/04.jpg', link: 'http://www.clientwebsite.com' }, ], { beforeShow: function() { $(".fancybox-image").wrap('&lt;a a target="_blank" href="' + this.link + '" /&gt;') }, /*Use caption attribute instead of title*/ beforeLoad: function () { this.title = $(this.element).attr('caption'); }, /*Fade image transition instead of default "elastic"*/ openEffect: 'fade', closeEffect: 'fade', nextEffect: 'fade', prevEffect: 'fade', /*Hide the prev button on the first image, and the next button on the last one.*/ loop: false }); return false; }); </code></pre> <p>Everything works fine except the captions aren't showing. Any assistance would be greatly appreciated.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload