试着弄清楚如何在现有代码中测试多个选择器,就像这样
if (!(jQuery('#selector1 || #selector2').hasClass('some-class'))) { //code here }
这不起作用,但想知道我能做些什么才能让它发挥作用?
jquery if-statement jquery-selectors
if-statement ×1
jquery ×1
jquery-selectors ×1