Answers for "if class child class has 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

Browse Popular Code Answers by Language