Skip to content

Instantly share code, notes, and snippets.

@elliottmangham
Last active December 7, 2020 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elliottmangham/d33d40813f5ef80a6f8f3650b6abd6dd to your computer and use it in GitHub Desktop.
Save elliottmangham/d33d40813f5ef80a6f8f3650b6abd6dd to your computer and use it in GitHub Desktop.
JS / LocomotiveScroll / Helpers
scroll.on( 'call', ( value ) => {
if ( value === 'exampleNameOne' ) {
console.log( 'Example #1' );
}
if ( value === 'exampleNameTwo' ) {
console.log( 'Example #1' );
}
} );
scroll.scrollTo( 'top', {
'offset': 0,
'callback': function() {
// do something...
},
'duration': 600,
'easing': [0.25, 0.00, 0.35, 1.00],
'disableLerp': true
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment