I am trying to find a solution to toggle (hide/show) threaded comments. I need to see only comments 1,2,3 etc… and hide 1.1,1.2,1.3 etc…
Clicking “show comments” will toggle and display the thread of comments.
example:
1 —
—–clicking “show more comments” shows
—– 1.1
—– 1.2
—– 1.3
—– …
2 —
—–clicking “show more comments” shows
—– 2.1
—– 2.2
—– 2.3
—– …
http://jsfiddle.net/K3gr7/4/
I used an ordered list to markup the comments. You probably need to tweak it to your own setup, and cache some variables for optimization, but the functionality is in there.
I misread your question at first, that’s why I added a “toggle all” button and left it in there as a free bonus.