Latest commit d6ae71b
Sep 28, 2010
The existence of the attribute needs to be verified, not its contents. Using the has- attribute selector will allow all of the following uses to work, where formerly only the first one would: <input autofocus> <input autofocus="autofocus" /> <input autofocus="true"> This obviously does not change any functionality in the plugin, but points the user in a better direction and may avoid confusion if a user happens to employ one of the latter two methods.
|Failed to load latest commit information.|
HTML5 autofocus plugin v0.2* Copyright (c) 2009, Mike Taylor, http://miketaylr.com MIT Licensed: http://www.opensource.org/licenses/mit-license.php NOTE: As per the spec, only one element is permitted to have the autofocus attribute, hence no .each() http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#autofocusing-a-form-control USAGE: $("[autofocus]").autofocus(); Thanks to paul_irish and temp01 for feedback and improvement suggestions.