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

Hovering on padding don't activate dropdown #120

Closed tadeubas closed 9 years ago

tadeubas commented 9 years ago

I've made a simple plunker to show when you have a padding on the parent element of dropdown-toggle, it doesn't activate the dropdown...

Plunker (try to hover from the left where there is a padding-left): http://plnkr.co/edit/PIRoqwBKnsYvKe5HxPYP?p=preview

I've solved this by removing the padding or using the following code:

$( document ).ready(function() {
  $('.page-header .top-menu .dropdown-toggle').mouseenter(function(){
    $(this).parent().addClass('open');
  });
});
CWSpear commented 9 years ago

The issue appears to be your padding-left on the li. Try using margin-left (and removing any padding).