Created
April 22, 2018 16:37
-
-
Save zHaytam/64a49ddf6d2073fbb7b1999fb31e4b6e to your computer and use it in GitHub Desktop.
Bootstrap 4 dropdown-on-hover test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bootstrap 4 dropdowns on hover | |
$('body').on('mouseenter', '.dropdown-on-hover', function (e) { | |
_d = $(e.target).closest('.dropdown>a'); | |
_d.dropdown('toggle'); | |
}); | |
$('body').on('mouseleave', '.dropdown-on-hover', function (e) { | |
var _d = $(e.target).prev('a'); | |
console.log(_d); | |
_d.dropdown('toggle'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment