FancyBox Iframe не закрывается второй раз
Я знаю, что этот вопрос задавался ранее, однако я не могу заставить свой код работать.
У меня начался мой модный ящик:
$(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
});
});
});
и тогда iframe называется:
<a class="fancybox fancybox.iframe" href="http://vimeo.com/123456">
</a>