Skip to content

Instantly share code, notes, and snippets.

@iamsubrataaich
Created August 20, 2020 01:04
Show Gist options
  • Save iamsubrataaich/9fdf4146d263161f1d68cad8aef0a651 to your computer and use it in GitHub Desktop.
Save iamsubrataaich/9fdf4146d263161f1d68cad8aef0a651 to your computer and use it in GitHub Desktop.
BaKLOKE
<div>
<a href="#">New Suranjana Hotel</a>
<a href="#">New Suranjana Hotel</a>
<a href="#">New Suranjana Hotel</a>
<div class="submenu">
New Suranjana Hotel
<div>
<a href="#">New Suranjana Hotel</a>
<a href="#">New Suranjana Hotel</a>
<a href="#">New Suranjana Hotel</a>
</div>
</div>
<a href="#">New Suranjana Hotel</a>
<a href="#">New Suranjana Hotel</a>
<a href="#">New Suranjana Hotel</a>
</div>
let submenu = document.querySelectorAll("div.submenu");
// console.log(submenu[0].children);
if (submenu[0].children === 'div') {
console.log('true');
}
a {
display: block;
}
div.submenu {
background-color: red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment