0

I have an input and an anchor.

I can change the color of anchor by .css({"color":hex})

But cannot change the style of hover and click.

a:hover and a:active

these two attributes

elixenide
  • 44,308
  • 16
  • 74
  • 100
Stan
  • 53
  • 9
  • Just so you know. That duplicate answer won't address your issue though. Why not just addClass so you can then define it in your stylesheet? – Adrianopolis Dec 16 '16 at 20:29
  • @Adrianopolis I also want to change the color of hovering dynamically – Stan Dec 16 '16 at 20:32
  • Hi Stan, you can not do that unless you apply a classname. If you look at all third party libs like bootstrap for example you will notice when you hover over elements and the color changes it is because a hover class has been added to the element or it has been defined in the stylesheet. – Adrianopolis Dec 16 '16 at 20:34
  • 1
    I could have gotten a bit of help that 'duplicate' question was about .hover() – Stan Dec 16 '16 at 20:37
  • Why didn't I think of that... :o) – Adrianopolis Dec 16 '16 at 20:39
  • Thank you Jeremy Harris, Praveen Kumaar.! – Stan Dec 16 '16 at 20:40

0 Answers0