📜  jQuery hasClass() - 检查多个类 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:45.703000             🧑  作者: Mango

代码示例1
element.is('.class1, .class2')
// works, but it's 35% slower than

element.hasClass('class1') || element.hasClass('class2')

//https://stackoverflow.com/questions/2214952/jquery-hasclass-check-for-more-than-one-class