title: Issues with filtering out rows of a generated table using jQuery
body: <p>I'm trying to filter out rows of an HTML table based on user input from a dropdown menu. My idea is to remove the rows if the first column of the first row is not equal to the value of the drop down menu. However the only thing I've been able to make it do is either just remove the first column, remove everything, or everything except the first column, depending on how I've messed with the jquery function. I'm sure it's something simple but I can't figure it out. The code I'm using is below:
  Jquert function:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          $('tr').show();
          $('#searchBtn').click(function () {
              var weaverSet = $("#weaverSet").val();
              $('tr').each(function () {
                  var weaveName = $('td.headerName').text();
                  if ($.trim(weaveName) != $.trim(weaverSet)) {
                      $(this).hide();
                  }
              });
          });
      });
  </code></pre>
  
  <p>Table:</p>
  
  <pre><code>&lt;table class="dataTable"&gt;
  &lt;tr&gt;
      &lt;th&gt;
          WS Name &amp;nbsp;
      &lt;/th&gt;
      &lt;th&gt;
          M Number
          &lt;br/&gt;
          Bar Code
      &lt;/th&gt;
      &lt;th&gt;
          Start Date
          &lt;br/&gt;
          Start Time
      &lt;/th&gt;
      &lt;th&gt;
          Length
          &lt;br/&gt;
          Doff Length
      &lt;/th&gt;
      &lt;th&gt;
          Name
          &lt;br/&gt;
          End Time
      &lt;/th&gt;
      &lt;th&gt;
          B Number
      &lt;/th&gt;
      &lt;th&gt;
          Dynamic Value
      &lt;/th&gt;  
  &lt;/tr&gt;
  
            &lt;tbody&gt;
      @foreach (var item in MVCMasterDetail.DataAccess.ManTracDataProvider.GetTopData())
      { 
  
          &lt;tr&gt;
              &lt;td class ="headerName"&gt;
                  @item.WSName
              &lt;/td&gt;
              &lt;td&gt;
                  @item.MNumber
              &lt;/td&gt;
              &lt;td&gt;
                  @item.StartDate
              &lt;/td&gt;
              &lt;td&gt;
                  @item.Length
              &lt;/td&gt;
              &lt;td&gt;
                  @item.Name
              &lt;/td&gt;
              &lt;td&gt;
                  @item.bnumber
              &lt;/td&gt;
              &lt;td&gt;
                  @item.DynamicValue
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
              &lt;/td&gt;
              &lt;td colspan="99"&gt; //This calls the partial view that renders the detail table inside of it
                  @Html.Action("MasterDetailDetailPartial", new { id = item.WorkOrderActualId, LNumber = item.MNumber })
  
              &lt;/td&gt;
          &lt;/tr&gt;
  
      }
               &lt;/tbody&gt;
  </code></pre>
  
  <p></p>