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

Popular posts from this blog

node.js - StackOverflow API not returning JSON -

python - Subclassed QStyledItemDelegate ignores Stylesheet -

sql server - TFS 2012 TF255062 Error after removing 'Active Directory' Role -