/ Published in: jQuery

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var improve = $('.improve'), $input = improve.find('input'), specify = "Please specify"; $input .val(specify) .bind('focus', function() { if ($(this).val()===specify){ $(this).val(''); } }) .bind('blur', function() { if (!$.trim($(this).val())) { $(this).val(specify); } });
Comments
