Question: I have the way to get the value of the td's at the time the row is selected using 

```
$(this).find('.servid').val()

```

However I cannot find the way to get this value later.

```
<table id="servicetable" class="scroll" style="border: 1px solid #cbcbcb;" align="center">
<tbody>
  <tr class="selected">
    <td>Service</td>
    <td class="servid" value="4004072">72569000</td>
    <td class="origin">PAC</td>
    <td class="street">60 KENDAL</td>
    <td class="city">SANRDINO</td>
    <td class="state">CA</td>
    <td class="zip">99999</td>
  </tr>
  <tr>
    <td>TelePacific Circuit</td>
    <td class="servid" value="5369592">77051900</td>
    <td class="origin">TP</td>
    <td class="street">819 KAISER</td>
    <td class="city">AHEM</td>
    <td class="state">CA</td>
    <td class="zip">88888</td>
  </tr>
</tbody>
</table>

```

I need to later, after filling out more of the form, get the val() of the selected tr -> servid td

I have tried various things but they are not working

```
$('#servicetable .selected > td:nth-child(2)').val();

$('#servicetable').find('.selected > td:nth-child(2)').val();

$('#servicetable').find('tr.selected').find('.servid').val();

```

Answer: 
Below goes your sollution

```js
alert($('#servicetable tr.selected > td.servid').attr('value'));
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<table id="servicetable" class="scroll" style="border: 1px solid #cbcbcb;" align="center">
<tbody>
  <tr class="selected">
    <td>Service</td>
    <td class="servid" value="4004072">72569000</td>
    <td class="origin">PAC</td>
    <td class="street">60 KENDAL</td>
    <td class="city">SANRDINO</td>
    <td class="state">CA</td>
    <td class="zip">99999</td>
  </tr>
  <tr>
    <td>TelePacific Circuit</td>
    <td class="servid" value="5369592">77051900</td>
    <td class="origin">TP</td>
    <td class="street">819 KAISER</td>
    <td class="city">AHEM</td>
    <td class="state">CA</td>
    <td class="zip">88888</td>
  </tr>
</tbody>
</table>
```

One more thing you can not put value like this as it will not validate as per w3c, recommanded to put data-value, if HTML5.
And in jquery also you can put like

```
alert($('#servicetable tr.selected > td.servid').attr('data-value'));

```
It might be better if you tag the `TR` with the id you need and then have the "attributes" in the `TD`s.
You can then parse `TD`s based on `TR`

```
   <tr class="selected" id="98989">
      <td class="city">Lisbon</td>
       .....

   _tr = $("#servicetable .selected");
   _trId=_tr.attr("id");
   _trCity = _tr.find(".city").text();

```

.....