Modify color placeholder

var defaultText= 'Search'; $('your_selector').val(defaultText).css('color','#999').focus(function(){ if($(this).val() == defaultText){ $(this).css('color','').val(''); } }).blur(function(){ if($(this).val() == ''){ $(this).val(defaultText).css('color','#999') } });
Modify color text in placeholder with jQuery

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.