收听属性更改的事件 [英] Event to listen to attribute changes

查看:82
本文介绍了收听属性更改的事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



谢谢

解决方案

这个jquery插件可能很有趣,因为它会以jquery的方式监视上述事件:

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


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.

Thanks

解决方案

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

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

这篇关于收听属性更改的事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆