when my php page loads some jQuery should set focus to my input textbox but it does not
I have tried css selectors like input[tabindex=1]
and #31
but to no avail...
here is the jQuery (version 1.7.1)
$(function() {
$('input[tabindex=1]').focus(); // also tried $('#31').focus();
});
and here is the HTML
<input tabindex='1' type='text' class='tablefilter' id='31' style='width:80px;border:inset 2px grey;background-color:white;font-size:12px;border-radius:0px;-moz-border-radius:0px;-webkit-border-radius:0px;'/>
any clues as to why this isn't working?