From 47dbd84b567f73d03c68581ecfe7f9218928c5af Mon Sep 17 00:00:00 2001 From: xbenjii Date: Mon, 10 Feb 2014 14:51:31 +0000 Subject: [PATCH] Ability to change animation/integrate with easings --- windows/js/jquery.windows.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/windows/js/jquery.windows.js b/windows/js/jquery.windows.js index 9129ced..9f73cdd 100644 --- a/windows/js/jquery.windows.js +++ b/windows/js/jquery.windows.js @@ -15,6 +15,7 @@ var that = this, snapping: true, snapSpeed: 500, snapInterval: 1100, + easing: 'swing', onScroll: function(){}, onSnapComplete: function(){}, onWindowEnter: function(){} @@ -126,7 +127,7 @@ var that = this, scrollTo = $visibleWindow.offset().top, // top of visible window completeCalled = false; // animate to top of visible window - $('html:not(:animated),body:not(:animated)').animate({scrollTop: scrollTo }, options.snapSpeed, function(){ + $('html:not(:animated),body:not(:animated)').animate({scrollTop: scrollTo }, options.snapSpeed, options.easing, function(){ if(!completeCalled){ if(t){clearTimeout(t);} t = null; @@ -158,4 +159,4 @@ var that = this, }); }; -})( jQuery, window, document ); \ No newline at end of file +})( jQuery, window, document );