I have a 5 x 5 table. Each cell is an asp.net textbox. I want to get al the 5 textbox values of the last row with a non empty textbox. For example:
This should get HELL O MY FRIE ND
But I get all the values BUT the last (ND). I don't know why. Here's my code:
// RIGHT HERE, $(this) referes to the whole table
$(this).find('input[value!=""]')
// I get the last edited textbox
.last()
// Go up to the parent <td>
.parent('td')
.siblings('td')
// I get all my brothers of type input
.children(':input')
.each(function () {
alert($(this).val());
});
I am doing something wrong but what? thank you.