I have a search bar that only displayed when the toggle button is clicked. The code I am using to do this is:
$("a.search-toggle").click(function(){
$(".search-bar").slideToggle(200);
$(this).toggleClass("open");
});
Now I am trying to find a way to auto select the input[type="search"] field when this toggle is actioned. Currently the user has to click the toggle button, then click the search field which isn't very user friendly.
Note
I am not looking for this to occur on page load, only once toggle has been activated.