mdbootstrap / bootstrap-hover-dropdown

An unofficial Bootstrap plugin to enable Bootstrap dropdowns to activate on hover and provide a nice user experience.
http://cameronspear.com/demos/bootstrap-hover-dropdown/
MIT License
1.26k stars 502 forks source link

Update bootstrap-hover-dropdown for Bootstrap 5 #165

Open derek-ye opened 3 years ago

derek-ye commented 3 years ago
PetrDlouhy commented 2 years ago

Maybe I have something misconfigured in my project, but I had to change line 119 to:

$parent.children(".dropdown-menu").addClass('show');

to make this work with Bootstrap 5.

And also I changed line 50 to:

if(!$parent.hasClass('show') && !($this.is(event.target) || $parent.is(event.target))) {

otherwise the hover action was unreliable.