[英]select with $('#id ul li') & excluding .class
I'm using the following code in a function. 我在函数中使用以下代码。
$('#id ul li').css('background-image','none');
Is it possible to add a unless statement so it excludes any li with the class .class ? 是否可以添加except语句,以便排除类为.class的任何li?
不是“除非”语句,而是:not()
语句:
$('#id ul li:not(.class)').css('background-image', 'none');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.