I know this question has been asked before, but I can't get my code to work.
I have my fancybox running:
$(document).ready(function() { $('.fancybox').on('click', function(event) { event.preventDefault(); $.fancybox({ 'type' : 'iframe', // hide the related video suggestions and autoplay the video 'href' : this.href = this.href.replace(new RegExp("([0-9])","i"),'moogaloop.swf?clip_id=$1') + '&autoplay=1', 'overlayShow' : true, 'centerOnScroll' : true, 'speedIn' : 100, 'speedOut' : 50, 'width' : 640, 'height' : 480 }); }); });
and then iframe is called:
<a class="fancybox fancybox.iframe" href="http://vimeo.com/123456">
But when I close the popup, and then try to open it again, the video does not appear, can anyone help me resolve it, most of the solutions are of the type: "inline" and do not make seams for working with my example.
Thank you very much,
source share