Maarten Wolfsen Maarten Wolfsen - 2 years ago 66
HTML Question

Direct user to input field, when button is clicked

I have a search icon. When this icon is clicked, a full screen search form pops up.

What I want, is when the user clicks on this icon and the search form appears, that the user goes directly to the input field. (that the focus is on this field, and the user can type away immediately).

(I have no idea how to formulate this correctly, so that might be why I could not find any question related)

Answer Source

Maybe this link from jQuery will help you out:

And the part of code inside the onclick event of search icon would be similar to this:

$(document).on("click","#searchIcon",function() {

Hope it helps you

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download