get element by class name one by one code example
Example: get element by class
var elements = document.getElementsByClassName(names); // or:
var elements = rootElement.getElementsByClassName(names);
var elements = document.getElementsByClassName(names); // or:
var elements = rootElement.getElementsByClassName(names);