Using jQuery cycle with .swf embeds
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开发者_JAVA百科">
<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>
Wrap each of the object
tags in a div
and then try, it should work. The reason is jQuery events do not work on object
tags. May be cycle plugin sets some events on the slide elements and they are not working.
精彩评论