• HTML5 Input Placeholder Fallback

    If you’re wondering how to support the HTML5 placeholder attribute for inputs and textareas, here’s a simple solution using Modernizr and a jQuery Placeholder plugin by Mathias Bynens (also used in Zurb’s Foundation). First we detect browser support and apply the placeholder plugin if it’s available, with an ‘ol fashion HTML label as fallback. if( !Modernizr.input.placeholder ) { // Browser does not support input placeholder attribute if( $.fn.placeholder ) { // The plugin exists, use it! $(‘input, textarea’).placeholder(); } else { // Browser doesn’t support… more