title: how to get values of columns for a selected row through jQuery
body: <p>here i am trying to fetch values of a particular column for a selected row via jquery.In Following code i have two rows which do not have any id.I tried following way and getting both rows value for that column appending each other.how to get value for that row only using jquery only.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
  function test(){
  var id = $(".use-address").closest("tr").find('td:eq(2)').text();
    alert(id);
  }
      &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;table id="choose-address-table" class="ui-widget ui-widget-content"&gt;
    &lt;thead&gt;
      &lt;tr class="ui-widget-header "&gt;
        &lt;th&gt;Name/Nr.&lt;/th&gt;
        &lt;th&gt;Street&lt;/th&gt;
        &lt;th&gt;Town&lt;/th&gt;
        &lt;th&gt;Postcode&lt;/th&gt;
        &lt;th&gt;Country&lt;/th&gt;
        &lt;th&gt;Options&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td class="nr"&gt;&lt;span&gt;50&lt;/span&gt;
  
        &lt;/td&gt;
        &lt;td&gt;Some Street 1&lt;/td&gt;
        &lt;td&gt;Glas&lt;/td&gt;
        &lt;td&gt;G0 0XX&lt;/td&gt;
        &lt;td&gt;United Kingdom&lt;/td&gt;
        &lt;td&gt;
          &lt;button type="button" class="use-address" onclick="test();"&gt;Use&lt;/button&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td class="nr"&gt;&lt;span&gt;30&lt;/span&gt;
        &lt;/td&gt;
        &lt;td&gt;Some Street 2&lt;/td&gt;
        &lt;td&gt;Glasgow&lt;/td&gt;
        &lt;td&gt;G0 0XX&lt;/td&gt;
        &lt;td&gt;United Kingdom&lt;/td&gt;
        &lt;td&gt;
            &lt;button type="button" class="use-address" onclick="test();"&gt;Use&lt;/button&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>