Dropdown menu entry are now clickable outside of the html link

This commit is contained in:
Frederic Guillot
2015-11-21 15:44:25 -05:00
parent 37ef906998
commit 41ecb163ee
6 changed files with 11 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@@ -31,6 +31,7 @@ ul.dropdown-submenu-open {
padding-bottom: 8px;
font-size: 0.85em;
border-bottom: 1px solid #f8f8f8;
cursor: pointer;
}
.dropdown-submenu-open li:last-child {

File diff suppressed because one or more lines are too long

View File

@@ -34,6 +34,12 @@ Dropdown.prototype.listen = function() {
clone.addClass('dropdown-submenu-open');
});
$(document).on('click', '.dropdown-submenu-open li', function(e) {
if ($(e.target).is('li')) {
$(this).find('a:visible')[0].click(); // Calling native click() not the jQuery one
}
});
};
Dropdown.prototype.close = function() {