How can I find out if the browser supports the HTML5 placeholder tag, so I can decide whether to hook my jQuery placeholder plugin or not.
var placeholderSupported = ( 'placeholder' in document.createElement('input') );
The variable placeholderSupported will be true if it is natively supported. Otherwise, it'll be set to false.
placeholderSupported
true
false
1.4m articles
1.4m replys
5 comments
57.0k users