File tree Expand file tree Collapse file tree 2 files changed +1
-17
lines changed
Expand file tree Collapse file tree 2 files changed +1
-17
lines changed Original file line number Diff line number Diff line change 33
44 {% include head.html %}
55
6- <!-- <body data-spy="scroll" data-target="#myAffix"> -->
76 < body >
87
98 {% include header.html %}
109
11-
1210 < div id ="main " class ="container main ">
1311 {{ content }}
1412 </ div >
1513
16-
1714 < div id ="top " data-toggle ="tooltip " data-placement ="left " title ="Go to Top ">
1815 < a href ="javascript:; ">
1916 < div class ="arrow "> </ div >
Original file line number Diff line number Diff line change @@ -103,32 +103,19 @@ function categoryAndTagDisplay() {
103103 } ) ;
104104}
105105
106- /**
107- * 回到顶部
108- */
109106function backToTop ( ) {
110- //滚页面才显示返回顶部
111107 $ ( window ) . scroll ( function ( ) {
112108 if ( $ ( window ) . scrollTop ( ) > 100 ) {
113109 $ ( "#top" ) . fadeIn ( 500 ) ;
114110 } else {
115111 $ ( "#top" ) . fadeOut ( 500 ) ;
116112 }
117113 } ) ;
118- //点击回到顶部
119114 $ ( "#top" ) . click ( function ( ) {
120- $ ( "body" ) . animate ( {
121- scrollTop : "0"
122- } , 500 ) ;
123- } ) ;
124-
125- //初始化tip
126- $ ( function ( ) {
127- $ ( '[data-toggle="tooltip"]' ) . tooltip ( ) ;
115+ window . scrollTo ( 0 , 0 ) ;
128116 } ) ;
129117}
130118
131-
132119/**
133120 * 侧边目录
134121 */
You can’t perform that action at this time.
0 commit comments