修改BUG:配置的菜单与地址可能不一致,导致面包屑导航条多了一个斜杠
This commit is contained in:
parent
453df71404
commit
702912d1c8
|
@ -21,9 +21,7 @@
|
|||
|
||||
// breadcrumb
|
||||
var arch = $('#nav-accordion').find('a.active').last();
|
||||
var breadcrumb = arch.text();
|
||||
if (breadcrumb === "") $breadNav.hide();
|
||||
else $breadNav.text(breadcrumb);
|
||||
$breadNav.text(arch.text());
|
||||
var top = arch.offset().top;
|
||||
if (top > $sidebar.height()) $sidebar.animate({ scrollTop: top + 300 - $sidebar.height() }, 800);
|
||||
|
||||
|
|
|
@ -3,9 +3,7 @@
|
|||
function setActive(ele) {
|
||||
ele.addClass('active');
|
||||
ele.parents("ul").first().find('p').addClass('active');
|
||||
var breadcrumb = ele.text();
|
||||
if (breadcrumb === "") $breadNav.hide();
|
||||
else $breadNav.text(breadcrumb);
|
||||
$breadNav.text(ele.text()).show();
|
||||
}
|
||||
$('#navbar').attr('data-toggle', "dropdown").addClass('dropdown-toggle');
|
||||
var $subMenu = $('#submenu');
|
||||
|
@ -19,6 +17,7 @@
|
|||
setActive($this);
|
||||
$('iframe').attr('src', $this.attr('href'));
|
||||
});
|
||||
$breadNav.hide();
|
||||
$subMenu.find('a').each(function (index, ele) {
|
||||
var $this = $(this);
|
||||
if ($this.attr('href') == window.location.pathname) setActive($this);
|
||||
|
|
Loading…
Reference in New Issue