focus

focus(element) -> HTMLElement

Gives keyboard focus to an element.

Example


Form.Element.focus('searchbox')
// Almost equivalent, but does NOT return the form element (uses the native focus() method):
$('searchbox').focus()