AnythingSlider jQuery导航

时间:2012-05-24 07:46:32

标签: jquery navigation anythingslider

我试图阻止使用此

点击.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;
});

2 个答案:

答案 0 :(得分:0)

尝试

$('.anythingSlider').delegate('.thumbNav li a','click', function(){
return false;
});

希望这会有用......

答案 1 :(得分:0)

只需将enableNavigation选项设置为falsedemo

即可
$('#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"
});​