Set the text selection color with jQuery. Demo not working
问题 http://jsfiddle.net/uKdPM/ I've set the ::selection color in css, so when you highlight the text on the screen, the color of the text is pink. I'm trying to now override that color through jQuery when the page loads. Seems like it should be super simple. But it's not working for me. 回答1: I believe if you want to achieve this kind of effect, you need to apply the color change based on a CSS class. I forked your jsfiddle, and heres the result Although i think your question is interesting, im