I have the following code
<input type="text" id="text_box1" >
I need to set focus on this field programmatically.
What i tried from the console( after the page has loaded) doesn't seem to work.
1) $('#text_box1').focus();
2) document.getElementById("text_box1").focus();
Any idea on what is wrong here?
I am using jQuery 1.11.3