使用 jQuery 循环和 .swf 嵌入
我正在尝试使用 jQuery 循环插件来显示一些 .swf 文件,但由于某种原因,分页器(由正确数量的项目生成)只能工作一次。之后,单击任何寻呼机按钮都不会执行任何操作。有什么想法可能是为什么吗?
jQuery 循环初始化:
$('.blog-slideshow').cycle({
fx: 'fade',
timeout: 0,
pager: '#pager',
slideExpr: 'object'
});
HTML:
<div class="blog-slideshow">
<object width="950" height="195" type="application/x-shockwave-flash">
<param name="movie" value="1.swf">
<embed src="1.swf" width="950" height="195"></embed>
</object>
<object width="950" height="195" type="application/x-shockwave-flash">
<param name="movie" value="2.swf">
<embed src="2.swf" width="950" height="195"></embed>
</object>
<object width="950" height="195" type="application/x-shockwave-flash">
<param name="movie" value="3.swf">
<embed src="3.swf" width="950" height="195"></embed>
</object>
<object width="950" height="195" type="application/x-shockwave-flash">
<param name="movie" value="4.swf">
<embed src="4.swf" width="950" height="195"></embed>
</object>
</div>
I'm trying to use the jQuery cycle plugin to display some .swf files but for some reason the pager (which is generated with the correct amount of items) only works once. After that, clicking on any of the pager buttons does nothing. Any ideas why this might be?
jQuery cycle initialization:
$('.blog-slideshow').cycle({
fx: 'fade',
timeout: 0,
pager: '#pager',
slideExpr: 'object'
});
HTML:
<div class="blog-slideshow">
<object width="950" height="195" type="application/x-shockwave-flash">
<param name="movie" value="1.swf">
<embed src="1.swf" width="950" height="195"></embed>
</object>
<object width="950" height="195" type="application/x-shockwave-flash">
<param name="movie" value="2.swf">
<embed src="2.swf" width="950" height="195"></embed>
</object>
<object width="950" height="195" type="application/x-shockwave-flash">
<param name="movie" value="3.swf">
<embed src="3.swf" width="950" height="195"></embed>
</object>
<object width="950" height="195" type="application/x-shockwave-flash">
<param name="movie" value="4.swf">
<embed src="4.swf" width="950" height="195"></embed>
</object>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将每个
object
标签包装在div
中,然后尝试,它应该可以工作。原因是 jQuery 事件不适用于object
标记。可能是循环插件在幻灯片元素上设置了一些事件,但它们不起作用。Wrap each of the
object
tags in adiv
and then try, it should work. The reason is jQuery events do not work onobject
tags. May be cycle plugin sets some events on the slide elements and they are not working.