Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript get child element by class

// get child element of #test with class my-class
var testContainer = document.querySelector('#test');
var childNodeByClass = testContainer.querySelector('.my-class');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #child #element #class
ADD COMMENT
Topic
Name
3+6 =