grabbing table row contents

grabbing table row contents

Hi Guys,

I am a lil new to JQ. I have a table and each row has a unique id like so <tr id="123">.

I have a edit button in one of the fields on that row, and I want to turn that row into a form.

How can I grab all the values of each field in that row and store them as a variable when the edit button in that row is clicked?

Here is what the table looks like now and any help would be greatly appreciated!

  1. <tr id="e2c420d928d4bf8ce0ff2ec19b371514">
  2.    <td><div id="item_name">asdf (asdf)</div></td>

  3.    <td><div id="item_description">asdf</div></td>

  4.    <td><div id="item_price">1234</div></td>

  5.    <td><div id="item_qty">1</div></td>

  6.    <td><div id="item_total">1234</div></td>
  7. </tr
  8. <tr id="e2c420d928d4bf8ce0ff2ec19b37132123">
  9.    <td><div id="item_name">asdf (asdf)</div></td>

  10.    <td><div id="item_description">asdf</div></td>

  11.    <td><div id="item_price">1234</div></td>

  12.    <td><div id="item_qty">1</div></td>

  13.    <td><div id="item_total">1234</div></td>
  14. </tr>