I have little problem with fancybox jquery library.
when I use this simple line of code:
$(document).ready(function() {
$(".fancybox").fancybox();
});
It’s shows modal image Ok, but when I click on Close then original clicked image on parent page disappear ?
I could use this sample of code to reload original page image after clicking close button,but reloading is not good option.
$(document).ready(function () {
$(".fancybox").fancybox({
afterClose : function() {location.reload();return;}
});
});
My question is how to prevent that my original clicked image does not disappear after I close modal image ?
you have to apply the class=”fancybox” to the
<a>tag and thehrefshould point to the image you want to open with fancybox – JFK