Skip to content

Instantly share code, notes, and snippets.

@lewebsimple
Created March 20, 2017 23:53
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lewebsimple/6121d35a5977cb036b08c8d9bdb94726 to your computer and use it in GitHub Desktop.
Save lewebsimple/6121d35a5977cb036b08c8d9bdb94726 to your computer and use it in GitHub Desktop.
[Bootstrap 4] Dropdown navbar menu on hover
// Dropdown navbar menu on hover
$('.dropdown-menu', this).css('margin-top', 0);
$('.dropdown').hover(function () {
$('.dropdown-toggle', this).trigger('click').toggleClass("disabled");
});
@diaolizhi
Copy link

$('.dropdown-toggle').hover(function () { $(this).trigger('click').toggleClass("disabled"); });
I think that's better

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment