implement code folding with html and java script

Posted by Vignesh on Stack Overflow See other posts from Stack Overflow or by Vignesh
Published on 2010-04-19T05:34:20Z Indexed on 2010/04/19 5:43 UTC
Read the original article Hit count: 341

Filed under:
|

I'm trying to collapse or expand table rows with + and - sign displayed on the first column, using jquery.

<script type="text/javascript">                                         
$(document).ready(function() {

   $("tr.header").click(function () { 
      $("tr.child", $(this).parent()).slideToggle("fast");

   });


});

I'm trying to use this code. But I want the child of the parent I'm clicking on alone to be toggled. Any ideas on how to do it?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about code-folding