get element by tag name + class 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);