Open dropdown on hover, navigate on click
This commit is contained in:
parent
fb64abbe06
commit
2558885868
2 changed files with 9 additions and 1 deletions
|
@ -39,7 +39,7 @@ $(document).ready(function () {
|
|||
});
|
||||
});
|
||||
|
||||
$('.navbar-brand').bind('click', function (event) {
|
||||
$('.navbar-brand').on('click', function (event) {
|
||||
if ($('html').scrollTop() > 100) {
|
||||
$('html, body').stop().animate({
|
||||
scrollTop: 0
|
||||
|
@ -49,3 +49,7 @@ $('.navbar-brand').bind('click', function (event) {
|
|||
}
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
$('.nav-item.dropdown').on('click', function () {
|
||||
window.location = $(this).find('a').attr('href');
|
||||
});
|
||||
|
|
|
@ -169,3 +169,7 @@ pre.chroma {
|
|||
background-color: #272822;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown:hover > .dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue