I have a list of items as follows
<ul>
<li><a href="http://toExtUrl/img.jpg" class="should-popout">
<img src="http://mywebsite.com/icon.png"></a>
</li>
</ul>
toExtUrl/img.jpg is added dynamically and it may sometimes shows pdf or HTML content instead of images(This is always external link). I'm trying to give the fancybox popout effect for whatever comes with href attribute of '.should-popout'.
But while clicking it just redirection to external url happens. My fancybox option is as follows
$(window).on('load', function(){
$('a.should-popout').fancybox({
'autoDimensions' : true,
'autoScale' : true
'hideOnContentClick': true,
'showCloseButton' : true
});
});
What may be the error in the setup.