How do I make fancybox href dynamic?

Without each() or click() simply add the beforeLoad callback to your script like this $(“.fancybox”).fancybox({ autoScale: false, // href : $(‘.fancybox’).attr(‘id’), // don’t need this type: ‘iframe’, padding: 0, closeClick: false, // other options beforeLoad: function () { var url = $(this.element).attr(“id”); this.href = url } }); // fancybox NOTE: this is for fancybox v2.0.6+ … Read more

Fancybox stuck loading iframe in IE

It seems like disabling pre-loading fixes the issue with iframes and IE so try this : $(document).ready(function () { /* fancybox handler */ $(‘.fancybox-media’).fancybox({ openEffect: ‘none’, closeEffect: ‘none’, autoSize: true, type: ‘iframe’, iframe: { preload: false // fixes issue with iframe and IE } }); }); Tested with fancybox v2.1.4 and IE7. Check JSFIDDLE

Fancybox doesn’t work with jQuery v1.9.0 [ f.browser is undefined / Cannot read property ‘msie’ ]

It seems like it exists a bug in jQuery reported here : http://bugs.jquery.com/ticket/13183 that breaks the Fancybox script. Also check https://github.com/fancyapps/fancyBox/issues/485 for further reference. As a workaround, rollback to jQuery v1.8.3 while either the jQuery bug is fixed or Fancybox is patched. UPDATE (Jan 16, 2013): Fancybox v2.1.4 has been released and now it works … Read more