[Plugin: Easy FancyBox] Multiple sizes of iframes / swfs in one page solution!
-
Hi,
I found a simple fix of how to place multiple iframes / swfs with diffrent sizes on the same page.
just wrap the .fancybox(…) function with an .each() function. example:The (wrong) way that used in Easy FancyBox 1.3.4.9
/* SWF */ $('a.fancybox-swf, area.fancybox-swf').fancybox( $.extend( {}, fb_opts, { 'type' : 'swf', 'width' : 200, 'height' : 200, 'padding' : 0, 'autoScale' : false, 'titleShow' : false, 'titlePosition' : 'float', 'titleFromAlt' : false, 'swf' : { 'wmode':'opaque', 'allowfullscreen':true } } ) );
The Fix (notice the new .each() function):
$('a.fancybox-swf, area.fancybox-swf').each(function() { $(this).fancybox( $.extend( {}, fb_opts, { 'type' : 'swf', 'width' : 200, 'height' : 200, 'padding' : 0, 'autoScale' : false, 'titleShow' : false, 'titlePosition' : 'float', 'titleFromAlt' : false, 'swf' : { 'wmode':'opaque', 'allowfullscreen':true } } ) ); });
The same could be fixed with any type of fancybox. (iframe, swf, youtube…)
I hope you will add this fix in the next version.
Thanks alot!
- The topic ‘[Plugin: Easy FancyBox] Multiple sizes of iframes / swfs in one page solution!’ is closed to new replies.