Question: I have a table:

```
<table>
<thead>
    <tr>
        <td>some1</td>
          ......
        <td>some2</td>
        <th>count</th>
        <th>EditCount</th>
    </tr>
</thead>
<tbody>
    <tr>
        <td>some1</td>
          ......
        <td>some2</td>
        <td>25</td>
        <td><input type='text' value='1'/></td>
   </tr>
   <tr>
        <td>some1</td>
          ......
        <td>some2</td>
        <td>35</td>
        <td><input type='text' value='3'/></td>
   </tr>

```

How to get td value in left side from input in each row, for example when user clicked on this input?

Answer: 
(Note from "left side" i took this to mean the first `td` ie the leftmost one)

Try this :

```
$('input[type=text]' ).change(function() {
  var firsttd = $('td:first', $(this).parents('tr'));
});

```

Uses the [.change()](http://api.jquery.com/change/) method in jQuery (this could be `focus` or `blur` etc). Uses the selector `td:first` to get the first `td` and sets the context to the current objects (`input') parent`tr`

[Working example here](http://jsfiddle.net/3tkyW/)

Update
------

To get the previous `td` (ie with values `25` or `35` use :

```
$('input[type=text]' ).change(function() {
  var prevtd = $(this).parent('td').prev('td');
});

```

This gets the [.parent()](http://api.jquery.com/parent/) `td` and then the [.prev()](http://api.jquery.com/prev/) `td`

[Working example here](http://jsfiddle.net/3tkyW/1/)
Add a class let suppose 'value' to all left side tds then and add another class on inputs
call this function

```
<script type = 'text/javascript'>
$('.button_class').click(function(){
        var myvalue = $(this).parent().children().attr(value);
});

```

this will automaticall select first children or you can use this too

```
var myvalue = $(this).parent().eq(0).attr(value);

```