I currently assign elements to Fancybox as follows:
$(document).ready(function(){
$(".popup").fancybox({
'speedIn' : 600,
'overlayOpacity' : 0.7,
'speedOut' : 200
});
});
When I load remote content using $.post(), some of that content contains…
<a class="popup" href="#somebox">Click me</a>.
Clicking the link does nothing, probably because the document ready only gets processed once on page load. How can I ‘reprocess’ this so that links in the remote content open up the fancybox?
I’ve looked around must most of the solutions are ASP.net based. I am currently using standard PHP and jQuery.
Thanks.
You could set your own click event on these links, using
.live():