jQuery plugin to provide a backwards compatible default input text fully browser compatible using JavaScript.
// Input Clear Default
$('input[placeholder],textarea[placeholder]').each(function() {
if($(this).val() === '') {
$(this).val($(this).attr('placeholder'));
}
$(this).focus(function() {
if($(this).val() == $(this).attr('placeholder')) {
$(this).val('');
}
});
$(this).blur(function() {
if($(this).val() === '') {
$(this).val($(this).attr('placeholder'));
}
});
});
