...
|
...
|
@@ -12,17 +12,17 @@ require('yoho.bootstrap'); |
|
|
$('.leftpanel .nav .parent>a').click(function() {
|
|
|
var coll = $(this).parents('.collapsed').length,
|
|
|
child = $(this).parent().find('.children');
|
|
|
|
|
|
|
|
|
if (!coll) {
|
|
|
$('.leftpanel .nav .parent-focus').each(function() {
|
|
|
$(this).find('.children').slideUp('fast');
|
|
|
$(this).removeClass('parent-focus');
|
|
|
});
|
|
|
|
|
|
if(!child.is(':visible')) {
|
|
|
|
|
|
if (!child.is(':visible')) {
|
|
|
child.slideDown('fast');
|
|
|
if(!child.parent().hasClass('active'))
|
|
|
child.parent().addClass('parent-focus');
|
|
|
if (!child.parent().hasClass('active'))
|
|
|
child.parent().addClass('parent-focus');
|
|
|
} else {
|
|
|
child.slideUp('fast');
|
|
|
child.parent().removeClass('parent-focus');
|
...
|
...
|
@@ -32,13 +32,12 @@ $('.leftpanel .nav .parent>a').click(function() { |
|
|
});
|
|
|
|
|
|
|
|
|
$(".leftpanel .nav .children a").each(function(){
|
|
|
var attr=$(this).attr("href");
|
|
|
if(attr==window.location.pathname+window.location.search){
|
|
|
$(".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 |
...
|
...
|
|