I have created an effect on my form with onblur and onfocus. How do I change the colors on these onblur and onfocus elements? However, I would like to keep the user's input default as black.
$('input:text').focus(function(){
var newValue = $(this).val();
if($(this).val() == 'Email'){
$(this).attr('value','');
} else {
$(this).val(newValue);
}
});
$('input:text').blur(function(){
var newValue = $(this).val();
if($(this).val() == ''){
$(this).attr('value','Email');
} else {
$(this).val(newValue);
}
});
Thank you