I'm writing a lightweight htc program for IE 9 (Javascript). CSS3 has a new property called transition, but it doesn't work in IE 9. I'm trying to implement this, but I need to know when a property changes. I'm familiar with DOMAttrModified
and onpropertychange
, but they don't trigger if CSS changes the property:
a {
color:#FFF;
}
a:hover {
color:#000;
}
If you mouseover an anchor, DOMAttrModified
doesn't do anything. I could use mouseover
, mouseout
, blur
, focus
, activate
and deactivate
and check every time they occur if a property changed, but what if:
div:hover a {
color:#FFF;
}
The user didn't hover the anchor tag, but CSS changed the color anyway. I think pie.htc has the same problem. I only need a solution compatible with IE 9...
I don't think there's an event for "onCSSChange"
How about running a subroutine every 50 ms and checking the current styling. If the CSS changes, you can fire your own event.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With