javascript - focus visible input by using jquery focus event -
$(document).ready(function () { $(document).on('body', function () { var visibleinput = $("input[type=text]").filter(':visible'); visibleinput.focus(); }); });
it doesn't work way wonder why. no error in console.
try this
$(document).ready(function(){ $("input[type=text]").filter(':visible').focus(); });
Comments
Post a Comment