summaryrefslogtreecommitdiff
path: root/touch/js/jquery.scrollzer.min.js
diff options
context:
space:
mode:
authorprashantsinalkar2019-04-22 12:35:05 +0530
committerprashantsinalkar2019-04-22 12:35:05 +0530
commit4ba4ccc3fddb242251d5442c78aba14f43835035 (patch)
tree143fb83eb49ec1001e5be0ca87302858f6bca6fe /touch/js/jquery.scrollzer.min.js
parent4dc90c39ae1a07db5f6f567fae84513c69ca1ac1 (diff)
downloadosdag_workshop_2019-4ba4ccc3fddb242251d5442c78aba14f43835035.tar.gz
osdag_workshop_2019-4ba4ccc3fddb242251d5442c78aba14f43835035.tar.bz2
osdag_workshop_2019-4ba4ccc3fddb242251d5442c78aba14f43835035.zip
created index page
Diffstat (limited to 'touch/js/jquery.scrollzer.min.js')
-rwxr-xr-xtouch/js/jquery.scrollzer.min.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/touch/js/jquery.scrollzer.min.js b/touch/js/jquery.scrollzer.min.js
new file mode 100755
index 0000000..4ee1519
--- /dev/null
+++ b/touch/js/jquery.scrollzer.min.js
@@ -0,0 +1,2 @@
+/* jquery.scrollzer v0.2 | (c) n33 | n33.co @n33co | MIT + GPLv2 */
+jQuery.scrollzer=function(e,t){var n=!1,r="object",i="clearTimeout",s="setTimeout",o="removeClass",u="scrollzer-locked",a="activeClassName",f=jQuery(window),l=jQuery(document);f.load(function(){var c,h,p,d,v,m,g,y,b,w,E=jQuery.extend({activeClassName:"active",suffix:"-link",pad:50,firstHack:n,lastHack:n},t),S=[],x=jQuery();for(c in e){p=jQuery("#"+e[c]),d=jQuery("#"+e[c]+E.suffix);if(p.length<1||d.length<1)continue;h={},h.link=d,h[r]=p,S[e[c]]=h,x=x.add(d)}y=function(){var e;for(c in S)e=S[c],e.start=Math.ceil(e[r].offset().top)-E.pad,e.end=e.start+Math.ceil(e[r].innerHeight());f.trigger("scroll")},f.resize(function(){window[i](g),g=window[s](y,250)}),w=function(){x[o](u)},f.scroll(function(){var e=0,t=n;v=f.scrollTop(),window[i](b),b=window[s](w,250);for(c in S)c!=m&&v>=S[c].start&&v<=S[c].end&&(m=c,t=!0),e++;E.lastHack&&v+f.height()>=l.height()&&(m=c,t=!0),t&&!x.hasClass(u)&&(x[o](E[a]),S[m].link.addClass(E[a]))}),f.trigger("resize")})}; \ No newline at end of file