I’m writing a backbone app, and using the built-in event handling, which uses jquery selectors.
I’d like to write a selector which will select everything except the .delete below, and then a selector for .delete exclusively (which is a lot simpler.)
Basically, I’d like to select everything in the parent except this one specific child.
I tried li:not(.delete), but that didn’t work. Any ideas?
<li class="">
<a href="#">
<i class="icon-book"></i>
<span class="name">@randallb</span>
<i class="delete icon-remove-sign pull-right"></i>
</a>
</li>
Try this: