title: Finding a row with a cell with a specific value
body: <p>I have to mark all rows in a table (and later change the code to delete the rows).</p>
  
  <p>The table structure looks like:</p>
  
  <pre><code>&lt;table class="table table-striped table-condensed" id="buckettable"&gt;
              &lt;thead&gt;
                  ...cut out
              &lt;/thead&gt;
              &lt;tbody&gt;
                  &lt;tr class="success"&gt;
                      &lt;td&gt;&lt;input class="fld-bucketno" type="checkbox" name="bucket" value="158bf61f-8f66-4dee-9ff6-b9d1f6d4b840" /&gt;&lt;/td&gt;
                      &lt;td class="text-right"&gt;
                          &lt;a class="bucketNo" href="/Sim/Staging/1212"&gt;1212&lt;/a&gt;
                      &lt;/td&gt;
  </code></pre>
  
  <p>What I am interested in is the value of the anchor in the td - second last line.</p>
  
  <p>I get a json list of id's to delete. First I mark them, then change the code to delete them. That is the idea, at least. Mind me - I know a lot of programming, but Javascript is an unknown land for me ;)</p>
  
  <p>My code so far is:</p>
  
  <pre><code>success: function (resp) {
                  var table = $('#buckettable').find('tbody')[0];
  
                  var length = resp.length;
                  for (var i = 0; i &lt; length; i++) {
                      var bucketNo = resp[i];
                      var rows = table.children.length;
                      for (var j = 0; j &lt; rows; j++) {
                          var row = table.children[j];
                          var bucket = row.find('.bucketNo').text();
                          if (bucket == bucketNo) {
                              alert(bucket);
                          }
                      }
                  }
                  $('#cleanup').modal('hide');
  </code></pre>
  
  <p>and I fail to filter the rows. I am open to any sensible other approach - hopefully it teaches me a lot.</p>
  
  <p>In the above code I manage to get the row... but then the find('.bucketNo') fails with an aexception that Object # has no method find....  which I find funny because I use that on a form earlier. Pointers to documentation VERY welcome, especially in addition to an answer.</p>
  
  <p>If there is a better way to do that tell me. I was told that search by ID is faster (obviously) but somehow I am not sure - should I set a coded ID (bucket-xxx, xxx being the number) on every row?</p>