我有这个,但它得到一个错误:
$('#Photocell').on('click', 'div.group:not('.overrideIcon')', function(){...});
我应该在 not() 中使用双引号吗?
我有这个,但它得到一个错误:
$('#Photocell').on('click', 'div.group:not('.overrideIcon')', function(){...});
我应该在 not() 中使用双引号吗?
Try this:
$('#Photocell').on('click', 'div.group:not(.overrideIcon)', function(){...});
No need of single quotes for the overrideIcon
class inside :not()
Since there are no spaces, you can simply omit the quotes:
$('#Photocell').on('click', 'div.group:not(.overrideIcon)', function(){...});
Safer way is inverting the quotes:
$('#Photocell').on("click", "div.group:not('.overrideIcon')", function(){...});