Search code examples
jquerynavigationanythingslider

AnythingSlider jQuery navigation


I´m trying to prevent click on the .thumbNav li navigation using this

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

But it just wont work??

I quess there is a function in the script that binds the click event and perhaps that is i problem?

Perhaps there is a way to override that feature?

Edit: Im running this function on the "onInitialized" callback

This is the 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>​

hmmm.. acctually this works in crome (but not ff or ie):

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

Solution

  • try

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

    hope this will work...