jQuery Focus in Internet Explorer -


i have input type text search field , i'm using jquery , focus, it's not working in internet explorer , wonder if have done wrong in code or if there better way it? preciate help! thanks!

$(document).ready(function(){  $("#search12_176db646136e9421c49d1b").focus();  }); 

the #search12_176db646136e9421c49d1b id id of input tag.

try this:

   $(document).ready(function(){        settimeout(function() {          $("#search12_176db646136e9421c49d1b").focus();       },1000);      }); 

or

$("#search12_176db646136e9421c49d1b")[0].focus(); 

here

$("#search12_176db646136e9421c49d1b")[0] 

is similar

document.getelementbyid('search12_176db646136e9421c49d1b') 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -