Possible Duplicate:
jQuery: Find the text of a list item that contains a nested ul
<div id="pro">
<ol></ol>
<li id="4331">Region
<ul>
<li id="4332">Asia</li>
<li id="6621">Europe</li>
</ul>
</li>
</div>
If I Click on Region only display Asia & Europe and Hide the Region when is clicked
i am using the .hide() method here is what i did so far:
$(document).ready(function() {
$("li").live("click", function(event) {
$("li").hide();
event.cancelBubble = true;
loadChild($(this).attr("id"), event);
return false;
})
});
my current output is:
<div id="pro">
<li id="4331" style="display: none;">
Region
<ul>
<li id="4332">Asia</li>
<li id="6621">Europe</li>
</ul>
</li>
</div>
It hides everything...
but I want to hide only the parent Region
I want to be able to click on it and after clicking hide Region and show Asia And Europe only.
if possible to display both at different div like
click on Region its display in div 1 and there child on div 2
then also give the answer how it possible..
Please help me out with this thanks.