请帮助使 click() 处理程序工作。
<ul class="thumbs" id="main_navi">
<li class="cir" id="navi0"><a class="thumb" title="1st Tee" rel="history"><img src="t/1st-Tee.jpg" alt="1st Tee" /></a></li>
</ul>
<a id="page-nav" title="Prev" href="#1">Prev</a>
/* this click works */
$("#main_navi li").click(function(){
// stop the running galleries
$(".nivoSlider").data('nivoslider').stop();
// Play the nivo slider from the first image of the gallery after clicking on the thumb
$("#slider"+($(this).prevAll().length+1) + " a.nivo-control").first().click();
});
/* this one does not */
$("#page-nav").click(function (){
$(".nivoSlider").data('nivoslider').stop();
});
我正在使用带有自动启动的自定义脚本,其中拇指突出显示。对于突出显示的每个拇指,大图像都会显示在右侧。如果我单击拇指 [ $("main_navi li") ] 会停止突出显示。但是,如果我单击页面导航转到第 2 页,拇指突出显示不会停止并将我跳回第 1 页。
本质上,如果我转到第 2 页,我需要停止拇指突出显示,以便我可以留在第 2 页。