jquery :not selector not working in next() method
Posted
by
Richard
on Stack Overflow
See other posts from Stack Overflow
or by Richard
Published on 2012-10-18T16:56:56Z
Indexed on
2012/10/18
17:01 UTC
Read the original article
Hit count: 242
what is the next best thing to use when you want to select the next li item, but not the one that has someClassName. The not selector returns an empty array!
or is this a case off using filter?
<li class="first">pickle</>
<li class="someClassName">tomato</li>
<li>chicken</>
<li>cocosnut</>
var current = $('ul.items li.first');
var next = current.next(':not(li.someClassName)');
thanks, Richard
© Stack Overflow or respective owner