cant find my first child when walking down the DOM tree
For some reason i cant find my first child.
$("p.menu_head_expand").click(function()
{
This works:
-
$("#siblingI a:first-child").css({color:"red"});
But this doesn´t:
-
$(this).siblings("div.menu_body a:first-child").css({color:"red"});
});
The tree where i want to find the first
-
<a>
:"ball"
<p class="menu_head_expand"><a class="animate expand" href="#">behandling</a></p>
<div class="menu_body" id="siblingI">
<a class="animate" href="#">ball</a>
<a class="animate siblingII" href="#">ring</a>
<a class="animate siblingII" href="#">token</a>
</div>