使用的 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>
正如您所看到的,播放和暂停按钮工作正常,不要在最后添加主题标签,下一个和上一个按钮仍然有效,但添加主题标签。
我想要做的是添加 return false; 到 .prev 和 .next 按钮,不使用内联 javascript(我知道如何做到这一点)并且不将链接留空(必须验证严格的 xhtml)。