jQuery Tablesorter - disabled headers show progress bar, sortEnd never triggered

Posted by McGirl on Stack Overflow See other posts from Stack Overflow or by McGirl
Published on 2010-06-12T16:27:39Z Indexed on 2010/06/12 16:32 UTC
Read the original article Hit count: 263

Filed under:
|

I'm combining Tablesorter's 'disable headers using options' function and the 'trigger sortStart / sortEnd' function and have run into an issue. The following code works fine for the most part, BUT: when you click on a disabled header, the progress-indicating #overlay div appears and never goes away.

<script type="text/javascript" id="js">
$(document).ready(function() {
  // call the tablesorter plugin, the magic happens in the markup
  $("#projectTable").tablesorter({ 
      // pass the headers argument and assing a object 
      headers: { 
          // assign the secound column (we start counting zero) 
          1: { 
              // disable it by setting the property sorter to false 
              sorter: false 
          }, 
          // assign the third column (we start counting zero) 
          2: { 
              // disable it by setting the property sorter to false 
              sorter: false
          } 
      } 
  });

  //assign the sortStart event
  $("#projectTable").bind("sortStart",function() {
      $("#overlay").show();
  }).bind("sortEnd",function() {
      $("#overlay").hide();
  });
}); </script>

Any ideas on how I could fix this so that nothing at all happens when the disabled headers are clicked? Thanks!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about tablesorter