Difference between revisions of "Template:British Columbia Navbar"

m
m
Line 183: Line 183:
 
}
 
}
  
 
.dropdown-submenu:hover>.dropdown-menu {
 
    display:block;
 
}
 
  
 
.dropdown-submenu>a:after {
 
.dropdown-submenu>a:after {
Line 229: Line 225:
 
   $(".navbar-green").show();
 
   $(".navbar-green").show();
 
}
 
}
 +
 +
//dropdown menu items open onclick instead of hover (mobile-friendly)
 +
$('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) {
 +
event.preventDefault();
 +
event.stopPropagation();
 +
$(this).parent().siblings().removeClass('open');
 +
$(this).parent().toggleClass('open');
 +
});
 +
 
});
 
});
  

Revision as of 11:13, 16 October 2016

Navbar CSS