How to implement JQuery easing into this window scroll movement function?
- by Mohammad
With this code I've been able to capture the mousewheel movement and apply it to the horizontal scroll bars instead of the vertical default.
$('html').bind('mousewheel', function(event, delta) {
window.parent.scrollBy(-120 * delta, 0);
return false;
});
Is there any way that I could add this jQuery easing animation to the scroll movement?
jQuery.extend( jQuery.easing, {
easeInOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
}
});
Thank you so much in advance!