diff options
| author | BigCoke233 <hi@guhub.cn> | 2020-07-11 09:53:14 +0800 |
|---|---|---|
| committer | BigCoke233 <hi@guhub.cn> | 2020-07-11 09:53:14 +0800 |
| commit | be75f1ab97dbc96923c50d13b08e89e26708ba99 (patch) | |
| tree | 70b79753869568b16f9fcc6b75f2c5607665c062 /assets/js | |
| parent | 4817b6ffa38af8b269e4ad91591d70c032dd8e5d (diff) | |
:zap: Perf: 用 css 实现锚链接平滑滚动,舍弃 js 控制 #62
Diffstat (limited to 'assets/js')
| -rw-r--r-- | assets/js/miracles.min.js | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/assets/js/miracles.min.js b/assets/js/miracles.min.js index 9e7cc27..fa6a6a8 100644 --- a/assets/js/miracles.min.js +++ b/assets/js/miracles.min.js @@ -145,9 +145,6 @@ schemeGeter.addListener(swDarkMode); * GoTop
*/
function GoTop() {
- $('body,html').animate({
- scrollTop: 0
- }, 500);
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
@@ -161,19 +158,6 @@ $(window).scroll(function() { });
/**
- * Anchor Link Animation
- */
-function anchorAniLoad(){
- $('a[href^="#"]').click(function(){
- $('html, body').animate({
- scrollTop: $($.attr(this, 'href')).offset().top
- }, 400);
- return false;
- });
-}
-anchorAniLoad();
-
-/**
* Js Loader
*/
//LazyLoad
@@ -525,7 +509,6 @@ if (loadPjax = true) { navColor();
//Link
linkTarget();
- anchorAniLoad();
//comment
MiraclesComment.bindReplyBtn(); //Bind Reply Button
MiraclesComment.core(); //Comment Core
|
