According to this: Change an HTML5 input's placeholder color with CSS The code to the change the placeholder color is:
::-webkit-input-placeholder { /* WebKit, Blink, Edge */
color: #909;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #909;
opacity: 1;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #909;
opacity: 1;
}
:-ms-input-placeholder { /* Internet Explorer 10-11 */
color: #909;
}
This code is really good and works fine. However, I have a small problem. I wants to change the color of the placeholder when someone clicking "submit" (The only problem is the function that change it on js... Everything else working good). This is what I tried to do with js:
$("#email").css('::-webkit-input-placeholder', 'red');
$("#email").css(':-moz-placeholder', 'red');
$("#email").css('::-moz-placeholder', 'red');
$("#email").css(':-ms-input-placeholder', 'red');
It doesn't works to me... What should I change to fix it? I guess it's something small, but I can't fix it... Any suggestions?