Monday, February 7th, 2011
Wow, I’m on fire today! So, here’s a quick code snippet to check to see if a browser supports HTML5 attributes, in this case the <input> tag’s ‘number’ type:
input.setAttribute( 'type', 'number' );
if ( input.type == 'text' )
{
$( 'html' ).addClass( 'no_inputs' );
}