要侦听属性更改的事件

时间:2021-12-20 23:54:08

I dont think this is possible but maybe someone knows a way to achieve this. I want to attach an event to an html element to listen to attribute change. So say for instance that I want something to happen when a visibility of a div changes. The reason is that I have no control over the javascript that is switching the visibility, hence the need for an event.

我不认为这是可能的,但也许有人知道实现这一目标的方法。我想将一个事件附加到一个html元素来监听属性更改。所以说,例如,当div的可见性发生变化时,我希望发生一些事情。原因是我无法控制切换可见性的javascript,因此需要一个事件。

Thanks

1 个解决方案

#1


2  

This jquery plugin might be interesting as it monitors the mentioned event in the jquery way:

这个jquery插件可能很有趣,因为它以jquery方式监视所提到的事件:

http://www.west-wind.com/weblog/posts/478985.aspx

#1


2  

This jquery plugin might be interesting as it monitors the mentioned event in the jquery way:

这个jquery插件可能很有趣,因为它以jquery方式监视所提到的事件:

http://www.west-wind.com/weblog/posts/478985.aspx