jquery - Find the last visible textbox index number -
i want find last visible textbox index number jquery, have tried code below giving wrong index number :
var lastindex = $('input[type=text]').filter(':visible:last').index();
your problem caused fact index()
looking @ siblings. you're selector working fine, see http://jsfiddle.net/2ueea/.
try following:
$('input[type=text]').filter(':visible:last').index('input[type=text]');
you'll index of input in relation other inputs on page. if that's not want receive, tell us.
Comments
Post a Comment