Ahmed Nuaman


builder of internets ~ developer of dreams ~ tamer of Dachshunds

Quickly Detect If A Browser Supports HTML5 Attributes

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:

var input   = document.createElement( 'input' );

input.setAttribute( 'type', 'number' );

if ( input.type == 'text' )
{
    $( 'html' ).addClass( 'no_inputs' );
}

Where have comments gone?

Good question my old fruity. I'm now sticking any post discussions on Google+. Why? Well simply it's better. WordPress's comment system isn't very elegant and nor are ones like Disqus or Livefyre, so to save hassle I've just shipped them off to a social network, like a real boss.

Search

My social skills

Latest blog posts

  • Loading posts...

Subscribe in a reader

Latest tweets

  • Loading tweets...