// get child element of #test with class my-class var testContainer = document.querySelector('#test'); var childNodeByClass = testContainer.querySelector('.my-class');