jquery toggling more than one div
- by Crays
Hi guys, i'm trying to make toggling div with only 1 javascript.
I tried this, the first div does what it was meant to do but the second doesn't.
Have a look.
<body>
<div>
<div>He
<div>You
<div id="Me"><a id="me">Me</a></div>
</div>
</div>
<div id="This">We
</div>
</div>
<div>
<div>1
<div>2
<div id="Me"><a id="me">3</a></div>
</div>
</div>
<div id="This">4
</div>
</div>
<script>
$("#me").click(function () {
$(this).parent().parent().parent().siblings("#This").slideToggle("slow");
});
</script>
</body>
when i click me, we disappear, alright. But when i click 3, 4 doesn't disappear.