1
Fork 0

Open dropdown on hover, navigate on click

This commit is contained in:
Jake Howard 2017-11-03 22:13:10 +00:00
parent fb64abbe06
commit 2558885868
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 9 additions and 1 deletions

View file

@ -39,7 +39,7 @@ $(document).ready(function () {
}); });
}); });
$('.navbar-brand').bind('click', function (event) { $('.navbar-brand').on('click', function (event) {
if ($('html').scrollTop() > 100) { if ($('html').scrollTop() > 100) {
$('html, body').stop().animate({ $('html, body').stop().animate({
scrollTop: 0 scrollTop: 0
@ -49,3 +49,7 @@ $('.navbar-brand').bind('click', function (event) {
} }
event.preventDefault(); event.preventDefault();
}); });
$('.nav-item.dropdown').on('click', function () {
window.location = $(this).find('a').attr('href');
});

View file

@ -169,3 +169,7 @@ pre.chroma {
background-color: #272822; background-color: #272822;
} }
} }
.dropdown:hover > .dropdown-menu {
display: block;
}