I'm developing a Drupal module. I need to set the focus to the first form element when a page is loaded. I read this can be done by using the jquery code -$('#edit-name').focus();
.
How do I add this code to the Drupal.behaviors so that my code will be automatically called when the page is loaded?