Hello, I wish to use slidetoggle with multiple divs. I have implemented it using only one div however I want all of the divs to operate independently.
Here is the HTML structure of a story on my website: <div class="story"> <div class="storytitle">hello</div> <div class="storybg">blah blah blah</div> <div class="storybottom"><a href="" id="comment- toggle">comment</a></div> <div class="commentbox" style="display:none;">comment form</div> </div> The div that I want to be toggled on each story is the commentbox div. It is activated by the comment-toggle link. Here is the corresponding javascript: $(document).ready(function() { $('.commentbox').hide(); $('a#comment-toggle').click(function() { $('#commentbox').slideToggle("slow"); alert($('#commentbox')); return false; }); });