Skip to content

Instantly share code, notes, and snippets.

@timn5835
Created January 11, 2021 16:21
Show Gist options
  • Save timn5835/dbd1c2a08ea68ec0216c2648c7b86a53 to your computer and use it in GitHub Desktop.
Save timn5835/dbd1c2a08ea68ec0216c2648c7b86a53 to your computer and use it in GitHub Desktop.
[Scroll to Top] #js #scroll
// ANIMATE TO THE TOP
$('button#to-top').on('click', function(e) {
animateScroll(0, 650);
// GA Custom Click Tracking
gtag('event','Click',{'event_category':'clicktrack','event_label':'Up Arrow'});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment