title: Partially search words in a TABLE with Jquery
body: <p>I use Javascript to search within a HTML table column. However, I can only search a value by typing the first letters of the table cells content.</p>
  
  <p>An example of my data is shown below. </p>
  
  <p>If I search for the value <strong>123</strong> in <em>column 2</em>, the desired table cell pops up like it should.</p>
  
  <p>If I search for the value <strong>456</strong> or <strong>23</strong> for example , nothing happens.</p>
  
  <pre><code>|column1|column2|
  __________________
  |000|123 456|
  |001|123 456|
  </code></pre>
  
  <p>My current Javascript:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          $("#searchn").on("keyup", function() {
              var value = $(this).val();
  
              $("table tr").each(function(index) {
                  if (index !== 0) {
  
                      $row = $(this);
  
                      var id = $row.find("td").children().eq(1).text();
  
                      if (id.indexOf(value) !== 0) {
                          $row.hide();
                      }
                      else {
                          $row.show();
                      }
                  }
              });
          });
          &lt;/script&gt;
  </code></pre>