I would like to know if is it possible to define various highlight classes in JQuery. What I want to do is highlight some tags selected whith selector1 in orange and other tags selected with selector2 in red.
this is my css code:
tag.highlight { background: orange; } //class toggled for tags selected by selector1
tag.highlight_red { background: red; }//class toggled for tags selected by selector2
tag.highlight works but tag.highlight_red doesnt. Any idea?
thanks
Maybe I’m missing what you’re trying to accomplish. Are you trying to change the background color of the element itself or just it’s selection color? I guess, define Selection.
If it’s just text selection color try the tips here: http://css-tricks.com/overriding-the-default-text-selection-color-with-css/