get child element by class javascript
snippet in javascript

get child element by class javascript

user3179

var element = document.querySelector('#Element');
var elementChildren = element.querySelectorAll('.Element-child');

get all the child of the same class javascript

user5465

var doc = document.getElementById("test");
var notes = null;
for (var i = 0; i < doc.childNodes.length; i++) {
    if (doc.childNodes[i].className == "4") {
      notes = doc.childNodes[i];
      break;
    }        
}