I have the following code which uses the index to get stylesheet and also css class inside that stylesheet.
for (var s = document.styleSheets.length - 1; s
var someVar = document.querySelectorAll('.someClass'); for(var i=0; i
This will grab all of the elements with the class 'someClass' and change the background color.