get table row data td and select
<p>Here is what I want to do.</p>

<p>In the first row that has tds then  <code>a = the text in the  first cell</code> and  <code>b = the selected value of the drop down that the user selected</code></p>

<p>How do I do this as my code is not working?</p>

<pre><code>$(document).ready(function () {
   var s = $('table td:first').parents('tr');

   var a = s.eq(0).text();
   var b = s.eq(1).find('option:selected').val();

   alert(a + "   " + b);
});

&lt;table&gt;
   &lt;tbody&gt;
      &lt;tr&gt;
         &lt;th&gt;ID&lt;/th&gt;
       &lt;/tr&gt;
       &lt;tr&gt;
          &lt;td&gt;
            test
           &lt;/td&gt;
           &lt;td&gt;
             &lt;select&gt;
               &lt;option value="yes"&gt;yes&lt;/option&gt;
               &lt;option selected="selected" value="no"&gt;no&lt;/option&gt;
             &lt;/select&gt;
           &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
</code></pre>
