我有以下列表:
<ul>
<li class="x anotherclass"></li>
<li class="y"></li>
<li></li>
<li class="z"></li>
<li></li>
<li class="y"></li>
</ul>
我想选择所有不属于y
.
属性包含选择器是否有相反的命令?
$("ul li[class*='y']") // Is there an opposite, maybe as in *!=...