Just in case you want to focus on the first element in a form, here is how to do it through one simple jQuery sector:
$('#form-id :input:enabled:visible:first').focus();
Once you select the right form (#form-id), it’s time to specify any input elements including text areas (:input) which are editable (:enabled), visible (:visible), and first in the form (:first).
Article Tags
Related blog posts

Products and Tools
Taking a Message-Based Approach to Logging
Robert Reselman

Detection and Response
6 Best Practices for Effective IT Troubleshooting
Robert Reselman

Security Operations
3 Steps to Building an Effective Log Management Policy
Robert Reselman

Security Operations
3 Core Responsibilities for the Modern IT Operations Manager
Robert Reselman
