Created
December 29, 2015 19:06
-
-
Save verticalgrain/4b9b1ec060beb3952e0e to your computer and use it in GitHub Desktop.
Skrollr initialization script with check for touch devices and old IE
This file contains hidden or 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
| app.skrollrinit = (function($){ | |
| 'use strict'; | |
| if ($('html').hasClass('no-touch') && !$('html').hasClass('ie8')) { | |
| var s = skrollr.init({ | |
| forceHeight:false, | |
| smoothScrolling:false, | |
| edgeStrategy:'ease', | |
| constants: { | |
| viewportheight: function() { | |
| var viewportHeight = $( window ).height(); | |
| return viewportHeight; | |
| } | |
| } | |
| }); | |
| } | |
| })(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment