-
-
Save ambar/2391598 to your computer and use it in GitHub Desktop.
html 5 autofocus pollfill
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var support = function(attr) { return attr in document.createElement('input') } | |
if ( !support('autofocus') ) { | |
$('input[autofocus]', $form).focus() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('input:not(:hidden,:disabled):first', $form).focus() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment