I cant seem to click all of the class\'s
document.getElementsByClassName(\'node closed\')[0].click();
This works but will only click on th
[0] means only the first element of the node list returned by getElementsByClassName.
[0]
getElementsByClassName
You have to do getElementsByClassName and iterate through all the matched elements like shown below:
var el = document.getElementsByClassName('node closed'); for (var i=0;i
Working Demo