On Oct 31, 2007, at 9:40 AM, Priest, James (NIH/NIEHS) [C] wrote:
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
<p><b>Text1</b></p>
<b>Text2</b>
How can I select the second <b>, which is not a child of a <p>? As I
am a newbie, I played a little bit around with :not, filter(), but
unfortunately
Use next()??
http://docs.jquery.com/Traversing/next#expr
Jim
I don't think next() will work in this case. Jochen is dealing with
parents and children here, and next() deals with siblings.
Jochen, try this instead:
$('b').filter(function() {
return !$(this).parent('p').length;
})
--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com