1
/*!
2
* multiscroll.js 0.1.8 Beta
3
* https://github.com/alvarotrigo/multiscroll.js
4
* @license MIT licensed
5
*
6
* Copyright (C) 2016 alvarotrigo.com - A project by Alvaro Trigo
7
*/
8
!function(e,t,n,o,i){e.fn.multiscroll=function(s){function a(){var n=t.location.hash.replace("#",""),o=n;if(o.length){var i=e(".ms-left").find('[data-anchor="'+o+'"]'),s="undefined"==typeof lastScrolledDestiny;(s||o!==lastScrolledDestiny)&&h(i)}
9
}
10
function l(t){clearTimeout(O);var o=e(n.activeElement);if(!o.is("textarea")&&!o.is("input")&&!o.is("select")&&s.keyboardScrolling){var i=t.which,a=[40,38,32,33,34];e.inArray(i,a)>-1&&t.preventDefault(),O=setTimeout(function(){r(t)}
11
,150)}
12
}
13
function r(t){var n=t.shiftKey;switch(t.which){case 38:case 33:X.moveSectionUp();break;case 32:if(n){X.moveSectionUp();break}
14
case 40:case 34:X.moveSectionDown();break;case 36:X.moveTo(1);break;case 35:X.moveTo(e(".ms-left .ms-section").length);break;default:return}
15
}
16
function c(t){t.preventDefault();var n=e(this).parent().index();h(e(".ms-left .ms-section").eq(n))}
17
function m(){var t=e(this).data("tooltip");e('<div class="multiscroll-tooltip '+s.navigationPosition+'">'+t+"</div>").hide().appendTo(e(this)).fadeIn(200)}
18
function f(){e(this).find(".multiscroll-tooltip").fadeOut(200,function(){e(this).remove()}
19
)}
20
function d(){N=e(t).height(),e(".ms-tableCell").each(function(){e(this).css({height:P(e(this).parent())}
21
)}
22
),u(),e.isFunction(s.afterResize)&&s.afterResize.call(this)}
23
function u(){s.css3?(S(e(".ms-left"),"translate3d(0px, -"+e(".ms-left").find(".ms-section.active").position().top+"px, 0px)",!1),S(e(".ms-right"),"translate3d(0px, -"+e(".ms-right").find(".ms-section.active").position().top+"px, 0px)",!1)):(e(".ms-left").css("top",-e(".ms-left").find(".ms-section.active").position().top),e(".ms-right").css("top",-e(".ms-right").find(".ms-section.active").position().top))}
24
function h(t){var n=t.index(),o=e(".ms-right").find(".ms-section").eq(W-1-n),i=t.data("anchor"),a=e(".ms-left .ms-section.active"),l=a.index()+1,r=b(t);K=!0;var c={left:t.position().top,right:o.position().top}
25
;if(o.addClass("active").siblings().removeClass("active"),t.addClass("active").siblings().removeClass("active"),C(i),s.css3){e.isFunction(s.onLeave)&&s.onLeave.call(this,l,n+1,r);var m="translate3d(0px, -"+c.left+"px, 0px)",f="translate3d(0px, -"+c.right+"px, 0px)";S(e(".ms-left"),m,!0),S(e(".ms-right"),f,!0),setTimeout(function(){e.isFunction(s.afterLoad)&&s.afterLoad.call(this,i,n+1),setTimeout(function(){K=!1}
26
,q)}
27
,s.scrollingSpeed)}
28
else e.isFunction(s.onLeave)&&s.onLeave.call(this,l,n+1,r),e(".ms-left").animate({top:-c.left}
29
,s.scrollingSpeed,s.easing,function(){e.isFunction(s.afterLoad)&&s.afterLoad.call(this,i,n+1),setTimeout(function(){K=!1}
30
,q)}
31
),e(".ms-right").animate({top:-c.right}
32
,s.scrollingSpeed,s.easing);lastScrolledDestiny=i,w(i),x(i,n)}
33
function v(){n.addEventListener?(n.removeEventListener("mousewheel",g,!1),n.removeEventListener("wheel",g,!1)):n.detachEvent("onmousewheel",g)}
34
function p(){n.addEventListener?(n.addEventListener("mousewheel",g,!1),n.addEventListener("wheel",g,!1)):n.attachEvent("onmousewheel",g)}
35
function g(e){e=t.event||e;var n=o.max(-1,o.min(1,e.wheelDelta||-e.deltaY||-e.detail));return K||(n<0?X.moveSectionDown():X.moveSectionUp()),!1}
36
function S(e,t,n){e.toggleClass("ms-easing",n),e.css(y(t))}
37
function y(e){return{"-webkit-transform":e,"-moz-transform":e,"-ms-transform":e,transform:e}
38
}
39
function x(t,n){s.navigation&&(e("#multiscroll-nav").find(".active").removeClass("active"),t?e("#multiscroll-nav").find('a[href="#'+t+'"]').addClass("active"):e("#multiscroll-nav").find("li").eq(n).find("a").addClass("active"))}
40
function w(t){s.menu&&(e(s.menu).find(".active").removeClass("active"),e(s.menu).find('[data-menuanchor="'+t+'"]').addClass("active"))}
...
</html>