Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
xaoxuu committed Dec 22, 2018
1 parent 94866a2 commit efa2ad2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ var customSearch;
}

function setHeaderMenu() {
var $headerMenu = $('header .menu');
var $headerMenu = $('header .menu');
// 先把已经激活的取消激活
$headerMenu.find('li a.active').removeClass('active');
// var $underline = $headerMenu.find('.underline');
function setUnderline($item, transition) {
$item = $item || $headerMenu.find('li a.active');//get instant
transition = transition === undefined ? true : !!transition;
function setUnderline($item) {
// if (!transition) $underline.addClass('disable-trans');
if ($item && $item.length) {
$item.addClass('active').siblings().removeClass('active');
Expand All @@ -64,7 +64,7 @@ var customSearch;
idname = "home";
}
$active_link = $('#' + idname, $headerMenu);
setUnderline($active_link, false);
setUnderline($active_link);
}

function setHeaderMenuPhone() {
Expand Down

0 comments on commit efa2ad2

Please sign in to comment.