Set focus on search bar on load
Set focus on search bar on load
When I open my HTML5 help page, the focus is not set in the search bar. You have to first click in the search bar to set the focus, then type your search query. Is there anyway to set the focus on load of the home page so that a user can just start typing their search?
Re: Set focus on search bar on load
If you search on Google, you'll find plenty of examples - they'll use javascript focus()
I'd suggest something like this for a Top Nav skin:
I'd suggest something like this for a Top Nav skin:
Code: Select all
$(document).ready(function(){
$("input.search-field").focus();
});