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

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -