Answers for "javascript check if div contains child with class"

CSS
0

css if child has class

.parent>.child-class {
	/* Styling goes here */
}
Posted by: Guest on March-18-2021
0

check if element with class has another class javascript

const div = document.querySelector('div');
div.classList.contains('secondary'); // trueCode language: JavaScript (javascript)
Posted by: Guest on March-02-2021

Code answers related to "javascript check if div contains child with class"

Browse Popular Code Answers by Language