I have a small jQuery selectors question, I have the following html:
<div class="member-info first"></div>
<div class="member-info"></div>
<div class="member-info"></div>
I want to hide (using jQuery) all the divs that holds the “member-info” class, but not the one holding the “first” class, any thoughts?
This uses the
not-selector(docs) to exclude elements with thefirstclass.Or if the purpose of the
firstclass is simply to identify the first, then do this instead:This uses the
slice()(docs) method to return a set starting with the second match.