Last active
May 8, 2017 14:51
-
-
Save ygkn/21694e189a6ebeba3de71bd8a4e3d419 to your computer and use it in GitHub Desktop.
【ハッカソン/キャンプに】 Web で最小の時間でちょっと「おっ」ってさせる小ネタ ref: http://qiita.com/ygkn/items/03cb8ba5c54058103c49
This file contains 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 characters
<script> | |
new SweetScroll({ | |
trigger: "[data-scroll]", | |
afterScroll(toScroll, trigger){ | |
location.hash = trigger.hash.slice(1)} | |
}); | |
</script> |
This file contains 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 characters
<a href="#main" data-scroll>メイン</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment