Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ourCompany = document.getElementById("our-company");
- var services = document.getElementById("services");
- var products = document.getElementById("products");
- var resources = document.getElementById("resources");
- var goTo = document.getElementById("go-to");
- // Close the dropdown(s) if the user clicks outside of it
- window.onclick = function (e) {
- if (!e.target.matches('.dropbtn') && !e.target.matches('.dropdown-content')) {
- ourCompany.classList.remove('active-drop');
- services.classList.remove('active-drop');
- products.classList.remove('active-drop');
- resources.classList.remove('active-drop');
- goTo.classList.remove('active-drop');
- }
- }
Add Comment
Please, Sign In to add comment