Ben Shelock
Ben Shelock

Reputation: 20965

Find Hover CSS Attribute

Lets say I had an element with multiple classes, one of these classes has a hover pseudo-class. Lets say this will change the colour.

So what I want to do is find out what colour the element will change to when hovered over. Then I want to override this with Javascript/jQuery.

Upvotes: 1

Views: 343

Answers (1)

mercator
mercator

Reputation: 28656

The animateToSelector jQuery plug-in seems to do what you want.

I found that plug-in through another question on StackOverflow. Also have a look at this question to see there isn't really any other way to do it but by going through document.styleSheets.

Upvotes: 1

Related Questions