[jQuery] Query for elements without a specific parent
[jQuery] Query for elements without a specific parent
Hello, Assume, I have the following HTML:
<b>Text1</b>
<b>Text2</b> How can I select the second <b>, which is not a child of a
? As I am a newbie, I played a little bit around with :not, filter(), but unfortunately $('b').filter(":not(p > b)") => both <b> are selected. $('b').not('p > b') => both <b> are selected. Any hints? Jochen