js check for class in classList
element.classList.contains(className);
js check for class in classList
element.classList.contains(className);
js check if div have another div
<script>
window.onload = function() {
var parentDiv = document.getElementById("commentBox");
var childDiv = document.getElementById("comment1");
if (parentDiv.contains(childDiv)) {
alert("yes");
} else {
alert("no");
}
}
</script>
<div class="row leftpad collapse" id="commentBox">
<div id="comment1">
<div class="col-md-3 dir-rat-left"> <i class="fa fa-user-circle" aria-hidden="true"></i>
<h6>James </h6>
</div>
<div class="col-md-9 dir-rat-right">
<p class="removemarg">always available, always helpfull that goes the same for his team that work with him - definatley our first phone call.</p>
</div>
</div>
</div>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us