Skip to content

Commit

Permalink
fixes #14892 - some plugins break javascript topbar behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Gail Steiger authored and tbrisker committed May 16, 2016
1 parent 056f271 commit f3bdcf6
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions app/assets/javascripts/topbar.js
Expand Up @@ -9,17 +9,22 @@ $(function() {

//open main menu on hover
$(document).on('mouseenter', '.collapse .dropdown.menu_tab_dropdown', function(){
if(!$(this).hasClass('open')){
$(this).find('.dropdown-toggle:first').click();
var $this = $(this);

if(!$this.hasClass('open')){
$this.addClass('open');
}
});

$(document).on('mouseleave', '.collapse .dropdown.menu_tab_dropdown', function(){
if($(this).hasClass('open')){
if($(this).hasClass('org-switcher')){
var $this = $(this);

if($this.hasClass('open')){
if($this.hasClass('org-switcher')){
$('.org-submenu').hide();
$('.loc-submenu').hide();
}
$(this).find('.dropdown-toggle:first').click();
$this.removeClass('open');
}
});

Expand Down

0 comments on commit f3bdcf6

Please sign in to comment.