我试图阻止使用此
点击.thumbNav li
导航
$('.anythingSlider').delegate('.thumbNav li','click', function(){
return false;
});
但它不会工作?
我认为脚本中有一个绑定click事件的函数,也许这就是我的问题?
也许有办法覆盖这个功能?
修改:我在"onInitialized"
回调
这是HTML:
<ul class="thumbNav" style="">
<li class="first">
<a class="panel1 cur" href="#">
<span>0</span>
</a>
</li>
<li>
<a class="panel2 disabled" href="#">
<span>1</span>
</a>
</li>
<li>
<a class="panel3 disabled" href="#">
<span>2</span>
</a>
</li>
<li>
<a class="panel4 disabled" href="#">
<span>3</span>
</a>
</li>
<li class="last">
<a class="panel5 disabled" href="#">
<span>4</span>
</a>
</li>
</ul>
嗯...实际上这适用于crome(但不是ff或ie):
$('.thumbNav li a').bind('click', function(){
return false;
});
答案 0 :(得分:0)
尝试
$('.anythingSlider').delegate('.thumbNav li a','click', function(){
return false;
});
希望这会有用......
答案 1 :(得分:0)
只需将enableNavigation
选项设置为false
(demo)
$('#slider').anythingSlider({
// if false, navigation links will still be visible, but not clickable.
enableNavigation: false,
});
或者,您可以将clickControls
选项设置为空字符串:
$('#slider').anythingSlider({
// Events used to activate navigation control functionality
clickControls: "" // default is "click focusin"
});