如何检测HTML元素的类别何时更改? [英] How can I detect when an HTML element’s class changes?

查看:123
本文介绍了如何检测HTML元素的类别何时更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<div class="current"></div>
<a href="#">text</a>

< div> 中添加 .live 类,并在发生时执行某些操作?

How do I detect when e.g. a .live class is added to this <div> and do something when it happened?

例如,如果类被更改,则隐藏链接。

For example, if class is changed, then hide the link.

我有一个缩小的脚本, c $ c>< div> 的类。

I have a minified script that makes changes on the <div>'s class. It’s too big for me to find the place where it happens, so I'm searching for some way to catch the class change.

推荐答案

这篇关于如何检测HTML元素的类别何时更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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