jquery - Change placeholder color in Javascript for Chrome -
as said here : change html5 input's placeholder color css, chrome doesn't support css property color input placeholders.
but there property named -webkit-input-placeholder
. if put on css :
#myinput::-webkit-input-placeholder { color: blue; }
it works. how can javascript (or jquery) ?
define in css have it, make #myinput.blue-placeholder::-webkit-input-placeholder
, add/remove "blue-placeholder" class jquery.
#myinput.blue-placeholder::-webkit-input-placeholder { color: #0000ff; }
Comments
Post a Comment