Focus first form input field using jQuery
function focusFirstInput($root) { $(':input', $root).not('[type="hidden"], button').first().focus(); }