Clicking on comment toggles children

I think it's very intuitive when clicking on a comment all of its threaded comments hide as well, so I've implemented this. 

How would this be implemented in pure JavaScript?– because I notice the code is written mostly without jQuery. What benefit would there be to use the functions built into JavaScript over jQuery?