[jQuery] Complex selector
After spending some time searching without luck here is my question:
I am looking for a way to select all and <table> elements which
are a child element of a <div>, except those that are of class
ImageHolder, with the condition to keep the order of the elements.
Example HTML:
<div>
test value 1
test value 2
<table><tr><td>test value 3</td></tr></table>
test value 4
<table class="ImageHolder"><tr><td>test value 5</td></tr></table>
test value 6
</div>
As a result I need:
test value 1, test value 2, test value 3, test value 4, test value 6
To select the correct elements I could use 2 queries $('div > p'), and
$('div > table:not(ImageHolder)')
but for the output I need them in the same order as in the HTML code.
Does jquery support some logical operations as 'select element OR
element'?
Any ideas and/or solutions are appreciated.