views:

1169

answers:

2

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 are $("a[href$=.jpg],a[href$=.png],a[href$=.gif]") type image, else swf.

How to write this perfect?

A: 

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 ;)

Amad
A: 

Yes, i have. If i remove type, youtube dont show. But, link like this: http://blabla.com/flash.swf shows corect.

fox