I cant seem to click all of the class\'s
document.getElementsByClassName(\'node closed\')[0].click();
This works but will only click on th
document.getElementsByClassName has some issues in IE
use jquery
window.onload=function(){ $(.yourclass).each(function(){ $(this).trigger('click'); }); }