Skip to content

Commit f022718

Browse files
authored
Change dropdown to work on hover instead of on click (#62)
* Change dropdown to hover
1 parent f548606 commit f022718

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

_sass/navigation.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@
247247
padding-right: rem(32px);
248248
position: relative;
249249
background-image: url($baseurl + "/assets/images/chevron-right-white.svg");
250-
background-size: 7px 12px;
251-
background-position: top 7px right 15px;
250+
background-size: 7px 18px;
251+
background-position: top 6px right 15px;
252252
background-repeat: no-repeat;
253253
&:hover {
254254
background-image: url($baseurl + "/assets/images/chevron-right-orange.svg");
@@ -259,7 +259,7 @@
259259
padding-right: rem(32px);
260260
position: relative;
261261
background-image: url($baseurl + "/assets/images/chevron-down-white.svg");
262-
background-size: 13px 13px;
262+
background-size: 14px 18px;
263263
background-position: top 7px right 10px;
264264
background-repeat: no-repeat;
265265
&:hover {
@@ -305,13 +305,11 @@
305305
width: 226px;
306306
display: none;
307307
position: absolute;
308-
top: rem(50px);
309308
z-index: 1000;
310309
display: none;
311310
float: left;
312311
min-width: 10rem;
313312
padding: 0.5rem 0;
314-
margin: 0.125rem 0 0;
315313
font-size: 1rem;
316314
color: #212529;
317315
text-align: left;
@@ -322,8 +320,10 @@
322320
border-radius: 0.25rem;
323321
}
324322

325-
.ecosystem-dropdown-menu.show-menu, .resources-dropdown-menu.show-menu {
326-
display: block;
323+
.ecosystem-dropdown:hover, .resources-dropdown:hover {
324+
.ecosystem-dropdown-menu, .resources-dropdown-menu {
325+
display: block;
326+
}
327327
}
328328

329329
.main-menu ul li {

assets/main-menu-dropdown.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
$("[data-toggle='ecosystem-dropdown']").on("click", function() {
1+
$("[data-toggle='ecosystem-dropdown']").hover(function() {
22
toggleDropdown($(this).attr("data-toggle"));
33
toggleArrowClass(".ecosystem-option");
44
});
55

6-
$("[data-toggle='resources-dropdown']").on("click", function() {
6+
$("[data-toggle='resources-dropdown']").hover(function() {
77
toggleDropdown($(this).attr("data-toggle"));
88
toggleArrowClass(".resource-option");
99
});

0 commit comments

Comments
 (0)