开发者

How can I detect with JavaScript when an element's styles change in Webkit? (Since DomAttrModified doesn't appear to be supported) [duplicate]

开发者 https://www.devze.com 2023-02-21 19:46 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: is there an alternative to DOMAttrModified that will work in webkit
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

is there an alternative to DOMAttrModified that will work in webkit

I'm trying to detect with JavaScript when an element's styles have been changed. If this change is detected (.NET validators becoming visible when triggered), it triggers another change elsewhere on the page (a visual effect on an unrelated eleme开发者_运维知识库nt not controlled by the .NET code.)

Using DomAttrModified (or propertychange for IE) I'm able to set an event handler that notifies me when the change takes place. But this isn't supported by Webkit. Is there an alternative or slightly different handler that would do what I'm seeking?

Here's a demo page showing what I currently have working for Firefox and IE: http://cssquirrel.com/testcases/detect-style-change/

Thoughts?


Use .watch() jQuery plugin: http://plugins.jquery.com/project/watch

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号