getelementbyclass
snippet in javascript

javascript get element by class

user8142

var elementsArray = document.getElementsByClassName("someclassname");

getelementbyclass

user925

var selector = document.getElementsByClassName('class-name');

select all elements with class javasc

user6946


 var x =
 document.getElementsByClassName("example");

 

javascript get all classes

user4718

var allHiddenElements = document.getElementsByClassName("hidden");