Selection of <td> cell
Selection of <td> cell
I want to select cell value of first td on row on which click event is performed. My table structure is below:
<table id="commission_view">
<tr class="comm_row">
<td><span class="hidemyrow">my value1</span></td>
<td>my value2</td>
<td>my value3</td>
<td>my value4</td>
<td>my value5</td>
</tr>
$('.comm_row').on('click', function() {
var hideme=$(this).next('.hidemyrow').text();
alert('text='+hideme);
});
});
It shows empty, i also tried with .html() but it still shows null. How can i get the value of first td which is "my value1"