Merge pull request #161 from ChrisBr/bugfix_admin_menu
Shows dropdown on load if path correspondent to link
This commit is contained in:
commit
643b8b173a
1 changed files with 12 additions and 0 deletions
|
|
@ -71,6 +71,18 @@ $(function() {
|
||||||
$(".user-details-popover").popover();
|
$(".user-details-popover").popover();
|
||||||
$("#comments-div").hide();
|
$("#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() {
|
$( ".myAccordion" ).mouseover(function() {
|
||||||
if(!$(this).find("ul").is(':visible')){
|
if(!$(this).find("ul").is(':visible')){
|
||||||
//Hide all except this
|
//Hide all except this
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue