2
使用jQuery代码:将回归真实的jQuery周期的下一个/上一个按钮
$('#contentspacer').cycle({fx:'fade',speed:2500,timeout:6000,next:'.next',prev:'.prev'});
$('.pause').click(function() {$('#contentspacer').cycle('pause'); return false;});
$('.play').click(function() {$('#contentspacer').cycle('resume'); return false;});
用于“导航”的HTML:
<div class="pnbtns"><a href="#" class="prev">←</a> <a href="#" class="pause">pause</a> <a href="#" class="play">play</a> <a href="#" class="next">→</a></div>
正如你可以看到,该剧和暂停按钮工作正常,不要在最后添加标签,下一个和上一个按钮仍然有效,但添加标签。
我想要做的是添加返回false;到.prev和.next按钮,而不使用内联JavaScript(我知道如何做到这一点),而不会将链接留空(必须验证严格的xhtml)。
这是一个RTFM时刻就在那里,非常感谢你的队友。 – Kirill 2009-08-04 22:19:01