Skip to content

Instantly share code, notes, and snippets.

@verticalgrain
Created December 29, 2015 19:06
Show Gist options
  • Select an option

  • Save verticalgrain/4b9b1ec060beb3952e0e to your computer and use it in GitHub Desktop.

Select an option

Save verticalgrain/4b9b1ec060beb3952e0e to your computer and use it in GitHub Desktop.
Skrollr initialization script with check for touch devices and old IE
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