Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用多类型对象设置fancybox?
我有这个:
$("a.fancybox").attr('rel', 'gallery').fancybox({ 'type': 'swf' });
youtube 工作正常,但所有图像都采用 flash 格式。
当我删除类型时,图像工作正常,但 youtube 不加载。我想通了。
如果链接是$("a[href$=.jpg],a[href$=.png],a[href$=.gif]")图像类型,则为 swf。
$("a[href$=.jpg],a[href$=.png],a[href$=.gif]")
如何完美地写这个?
删除类型属性...
$("a.fancybox").attr('rel', 'gallery').fancybox();
你有最新版本的 Fancybox 吗?因为 fancybox 理解链接 flash、image 或 ajax bla bla ... ok ;)