File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -47,11 +47,11 @@ var customSearch;
47
47
}
48
48
49
49
function setHeaderMenu ( ) {
50
- var $headerMenu = $ ( 'header .menu' ) ;
50
+ var $headerMenu = $ ( 'header .menu' ) ;
51
+ // 先把已经激活的取消激活
52
+ $headerMenu . find ( 'li a.active' ) . removeClass ( 'active' ) ;
51
53
// var $underline = $headerMenu.find('.underline');
52
- function setUnderline ( $item , transition ) {
53
- $item = $item || $headerMenu . find ( 'li a.active' ) ; //get instant
54
- transition = transition === undefined ? true : ! ! transition ;
54
+ function setUnderline ( $item ) {
55
55
// if (!transition) $underline.addClass('disable-trans');
56
56
if ( $item && $item . length ) {
57
57
$item . addClass ( 'active' ) . siblings ( ) . removeClass ( 'active' ) ;
@@ -64,7 +64,7 @@ var customSearch;
64
64
idname = "home" ;
65
65
}
66
66
$active_link = $ ( '#' + idname , $headerMenu ) ;
67
- setUnderline ( $active_link , false ) ;
67
+ setUnderline ( $active_link ) ;
68
68
}
69
69
70
70
function setHeaderMenuPhone ( ) {
You can’t perform that action at this time.
0 commit comments