Saturday, January 21, 2017

css - I set color to input placeholder in but can't do this for text using jQuery

I want set color for placeholder in input.I write this code for my input




 $('#txtEmailForgot').attr('placeholder', function () {
$(this).css('color', '#6C6C6C');
});`


It works good and when I type the text in input, it must be black but it has the same color like words in placeholder.
How I can set color special for text when I want type something in this input.
Thanks a lot!

No comments:

Post a Comment