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; } 

demo: http://jsfiddle.net/ay3j6/


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -