Last active
December 7, 2020 08:16
-
-
Save elliottmangham/d33d40813f5ef80a6f8f3650b6abd6dd to your computer and use it in GitHub Desktop.
JS / LocomotiveScroll / Helpers
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
scroll.on( 'call', ( value ) => { | |
if ( value === 'exampleNameOne' ) { | |
console.log( 'Example #1' ); | |
} | |
if ( value === 'exampleNameTwo' ) { | |
console.log( 'Example #1' ); | |
} | |
} ); |
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
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