Merge pull request #161 from ChrisBr/bugfix_admin_menu

Shows dropdown on load if path correspondent to link
This commit is contained in:
Christian Bruckmayer
2014-05-23 16:29:48 +02:00

View File

@@ -71,6 +71,18 @@ $(function() {
$(".user-details-popover").popover();
$("#comments-div").hide();
$(document).ready(function () {
var path = window.location.pathname;
$(".myAccordion ul").each(function () {
$this = $(this);
$this.find("a").each(function () {
if ($(this).attr("href") == path) {
$this.show();
}
})
});
});
$( ".myAccordion" ).mouseover(function() {
if(!$(this).find("ul").is(':visible')){
//Hide all except this