Get last visible element using jQuery
There are different jQuery Selectors for those purposes.
For example:
$('table tr:visible:last').attr('number');
or
$('table tr:visible').last().attr('number');
and so on.
Full code
$('#check').click(function() {
check = $('table tr:visible:last').attr('number');
alert(check);
});
DEMO
$("table tr:visible:last").attr("number");
See the jQuery Documentation on Selectors for more info on the :visible
and :last
selectors.