I want to dynamically generate a fancybox popup on one of my page. The idea is, I generate an image, apply fancybox and it, and then directly show the popup
At the moment, I do:
// Image generation...
// At the end I get the image then apply the fancbox
jQuery('a#myimage').fancybox();
// Then I would like the popup to appear directly so I do...
jQuery('a#myimage').click();
... But it doens't work because sometimes, the fancybox is not yet active when the click fires ! Is there a way to execute the click when the fancybox has fully initialized ?
Thanks in advance