title: Searching in table jQuery
body: <p>I have made a script to find strings in table. When it finds it shows the row otherwise hide it.
  It is working perfectly in Chrome but it is some what lagging in Firefox and Internet Explorer. Is this code good or can it be better ?</p>
  
  <pre><code>$("#searchValue").keyup(function() {
  
    var table = $(this).siblings('table').not(':hidden');
    var name = $("#searchValue").val();
    if (name === "") {
      $(table).find('tr').show();
      $(table).trigger('update');
    }
    else {
      name = name.toLowerCase();
      var trs = $(table).find('tr').not(':first');
      trs.each(function() {
        var tr = $(this);
        var count = ($(tr).children('td').length);
        var suc = -1;
        for (var i = 0; i &lt; count; i++) {
          var state = $(tr).children("td").eq(i).html();
          state = state.toLowerCase();
          if (state.match(name)) {
            suc = 1;
          }
          else if (suc !== 1) {
            suc = 0;
          }
        }
        if (suc === 1) {
          $(tr).show();
        }
        else {
          $(tr).hide();
        }
      });
  
      $(table).trigger('update');
    }
  });
  </code></pre>
  
  <p>Table : </p>
  
  <pre><code>  &lt;table id='tableProject' class='tablesorter'&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Project ID&lt;/th&gt;
              &lt;th&gt;Customer&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              &lt;th&gt;Status&lt;/th&gt;
              &lt;th&gt;Max Hours&lt;/th&gt;
              &lt;th&gt;Achieved&lt;/th&gt;
              &lt;th&gt;Difference&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
  
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>