I have page that looks something like this
<h4></h4>
<table></table> < want this
... < want all these tables
<table></table> < want this
<h4></h4>
<table></table> < not this
... < not these
<table></table> < not this
I’m trying to select only tables under first <h4> element using this jQuery selector
$("h4:eq(0) ~ table.someClass:not(h4:eq(1) ~ table.somaClass)")
It doesn’t work – returns all tables.
Using
divto have an easier test-case:http://jsbin.com/ipuvix/3/