On Nov 16, 2007, at 5:59 PM, skube wrote:


Nope, that results in all of the <p>'s being hidden in the first
<div>:
<div class="myDiv">
</div>
<div class="myDiv">
  <p>First</p>
</div>

Actually, Wizzud's suggestion worked for me when I tested it locally:

$('div.myDiv p:not(:first-child)').hide()

Hides all p elements that are descendants of <div class="myDiv"> and are not the first child of their parent. The result I got was:

<div class="myDiv">
  <p>First</p>
</div>
<div class="myDiv">
  <p>First</p>
</div>


--Karl

Reply via email to