Setting focus

If you head over to http://google.com, you'll see that they've made it really easy for you to conduct a web search—as soon as the page is loaded up in the browser, the cursor is blinking in the search field. There are other sites on the web that behave this way too, making it quick and easy to get started filling in a form.

Any time you have a page where the site visitor's main task on the page will be completing a form, you can make things easy on your site visitor by placing the cursor into the first form field so they can just start typing. And it's wicked easy with jQuery. Here's how to do it.

Get jQuery for Designers Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.