jQuery: Focus the first input of a text field

James11th Jun 2009Random

If you have forms around your site (logins, registrations, etc), you might want to automatically focus those fields so the user has less clicking around to do.  We want to do this unobtrusively, and don’t want to focus it if the field already has data in it (editing existing forms).  Here’s the jQuery code to pull it off:

No Comments Comments Feed

Sorry, the comment form is closed at this time.

The comments are closed.