-
-
Save jimyuan/12ca8bb38e7b6904f7bde1f271d9406a to your computer and use it in GitHub Desktop.
Revisions
-
jimyuan created this gist
Sep 8, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ .disable-hover { pointer-events: none; } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ window.addEventListener('scroll', () => { let body = document.body, timer clearTimeout(timer) !body.classList.contains('disable-hover') && body.classList.add('disable-hover') timer = setTimeout(() => { body.classList.remove('disable-hover') }, 500); }, false);