Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Smooth Scrolling
- $('.class a').on('click', function(event) {
- if (this.hash !== '') {
- event.preventDefault();
- const hash = this.hash;
- $('html, body').animate(
- {
- scrollTop: $(hash).offset().top
- },
- 800,
- function() {
- window.location.hash = hash;
- }
- );
- }
- });
Add Comment
Please, Sign In to add comment