...
|
...
|
@@ -31,13 +31,35 @@ $('.leftpanel .nav .parent>a').click(function() { |
|
|
return false;
|
|
|
});
|
|
|
|
|
|
var isMenuShow=false;
|
|
|
var localStorage=window.localStorage;
|
|
|
|
|
|
// $(".leftpanel .nav .children a").each(function() {
|
|
|
// var attr = $(this).attr('href');
|
|
|
$(".leftpanel .nav .children a").each(function() {
|
|
|
var attr = $(this).attr('href');
|
|
|
|
|
|
// if (attr == window.location.pathname + window.location.search) {
|
|
|
// $(this).parents(".children").show();
|
|
|
// $(this).parent("li").addClass("active");
|
|
|
// $(this).parents(".parent").addClass("parent-focus");
|
|
|
// }
|
|
|
// }); |
|
|
\ No newline at end of file |
|
|
if (attr == window.location.pathname + window.location.search) {
|
|
|
$(this).parents(".children").show();
|
|
|
$(this).parent("li").addClass("active");
|
|
|
$(this).parents(".parent").addClass("active");
|
|
|
localStorage.setItem("router",attr);
|
|
|
localStorage.getItem("router");
|
|
|
isMenuShow=true;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
if(!isMenuShow&&localStorage.getItem("router")){
|
|
|
$(".leftpanel .nav .children a").each(function() {
|
|
|
var attr = $(this).attr('href');
|
|
|
|
|
|
if (localStorage.getItem("router") == attr) {
|
|
|
$(this).parents(".children").show();
|
|
|
$(this).parent("li").addClass("active");
|
|
|
$(this).parents(".parent").addClass("active");
|
|
|
isMenuShow=true;
|
|
|
}
|
|
|
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
// LocalStorage.setItem("router",); |
|
|
\ No newline at end of file |
...
|
...
|
|