That is because of an extra <tr>
at the begnining.
remove the first <tr>
which does not have an end </tr>
. <table class='bokse'><tr>
See this http://jsfiddle.net/3PM9M/
$(".up, .down").click(function(){
alert('total rows -' + $(this).parents('table').find('tr').length); //Gives all the tr's
alert('Clicked row -' + (parseInt($(this).parents('tr').index()) + 1)); // clicked tr's index
});