amiel/html5support — Issue #2: Alternative syntax for autofocus
Author: brendon
Created: 2012-02-16 23:18:43+00:00
State: open

Hi there, thanks for this great plugin :)

You might want to add support for the following syntax of autofocus as I use simple_form in Rails to generate the forms and it spits out autofocus="autofocus" which is still valid html I think:

$('[autofocus="autofocus"]').autofocus();

I've just hacked around this in my app but it'd probably make a good addition to the code. Sorry for not supplying a patch but I thought this would probably be simpler for you to quickly change :)