开发者

Fancybox with images and youtube

开发者 https://www.devze.com 2022-12-19 08:13 出处:网络
How to set fancybox with multitype objects? I have this: $(\"a.fancybox\").attr(\'rel\', \'gallery\').fancybox({ \'type\': \'swf\' });

How to set fancybox with multitype objects?

I have this:

$("a.fancybox").attr('rel', 'gallery').fancybox({ 'type': 'swf' });

youtube works fine, but all images goes flash format.

When I remove type, images works fine, but youtube dont load. I figured out this.

If links ar开发者_如何学Ce $("a[href$=.jpg],a[href$=.png],a[href$=.gif]") type image, else swf.

How to write this perfectly?


remove the type attirbute...

$("a.fancybox").attr('rel', 'gallery').fancybox();

Do you have latest version of Fancybox?? Because fancybox understand a link flash, image or ajax bla bla... ok ;)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号