Skip to content

Commit 772b612

Browse files
Merge pull request #194 from nikhilkalburgi/develop
Fix the Products Dropdown Issue
2 parents f4cb652 + 36147f0 commit 772b612

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

assets/scss/_footer_project.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
color: $white;
44
line-height: 28px;
55
padding: 2.5rem 3rem 1.5rem;
6-
z-index: 100;
6+
z-index: 30;
77
display: flex;
88
flex-direction: column;
99
align-items: center;

layouts/partials/navbar.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,16 @@
2121
</a>
2222
</li> -->
2323
<li class="nav-item dropdown" data-bs-theme="dark">
24-
<a
24+
<span
2525
class="nav-link dropdown-toggle"
26-
href="#"
2726
id="navbarDropdown"
2827
role="button"
2928
data-toggle="dropdown"
3029
aria-haspopup="true"
3130
aria-expanded="false"
3231
>
3332
Products
34-
</a>
33+
</span>
3534
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
3635
<a
3736
class="dropdown-item"
@@ -137,6 +136,12 @@
137136
dropdown.classList.toggle("current");
138137
document.querySelector(".dropdown-menu").classList.toggle("show");
139138
});
139+
document.body.addEventListener('click', function(e) {
140+
if(e.target != dropdown && dropdown.classList.contains("current")){
141+
dropdown.classList.toggle("current");
142+
document.querySelector(".dropdown-menu").classList.toggle("show");
143+
}
144+
})
140145
// console.log(window.location.pathname == "/cloud/");
141146
// check if the current page ic cloud
142147
let cur;

0 commit comments

Comments
 (0)