开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜