jQuery立即从所有后代中删除CSS类 [英] jQuery Remove CSS Class from all Descendants at once
本文介绍了jQuery立即从所有后代中删除CSS类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以一次从元素中的所有XYZ元素中删除特定的CSS类吗?
Can I remove a specific CSS class from all XYZ elements within an element at once?
示例:从所有< a> $ c中删除CSS类
有效
我的搜索 div
中的$ c> 锚点。
Example: Remove CSS class active
from all <a>
anchors within my search div
.
如果是这样,怎么做?
推荐答案
$("#mydiv a").removeClass("active");
这篇关于jQuery立即从所有后代中删除CSS类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文