Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

jsarnowski / jsarnowski/jet-blocks   php

Repository URL to install this package:

Version: 1.2.8 

/ js / lib / jsticky / jquery.jsticky.min.js

!function(i){i.fn.jetStickySection=function(t){var e={topSpacing:0,zIndex:"",stopper:i(".sticky-stopper"),stickyClass:!1},y=i.extend({},e,t);var k="number"==typeof y.zIndex;var u=0<y.stopper.length||"number"==typeof y.stopper;return this.each(function(){var c=i(this),n=y.topSpacing,t=c.outerHeight(),e=c.outerWidth(),r=y.zIndex,p=c.offset().top-n,a=i("<div></div>").width(e).height(t).addClass("sticky-placeholder"),f=y.stopper,d=i(window),l=!1,h=!1;function s(){if(!l){var t=c.outerHeight(),e=d.scrollTop(),s=f,i=c.parent().width();if(a.width(i),u&&"number"!=typeof y.stopper)s=f.offset().top-t-n;if(p<e){if(y.stickyClass&&c.addClass(y.stickyClass),c.after(a).css({position:"fixed",top:n,width:i}),k&&c.css({zIndex:r}),u&&s<e){var o=s-e+n;c.css({top:o})}h||c.trigger("jetStickySection:stick"),h=!0}else y.stickyClass&&c.removeClass(y.stickyClass),c.css({position:"",top:"",left:"",width:""}),a.remove(),h&&c.trigger("jetStickySection:unstick"),h=!1}}d.innerHeight()>t&&(c.on("jetStickySection:activated",s),d.on("scroll",s),d.on("touchmove",s),d.on("resize",s),c.on("jetStickySection:detach",function(){l=!0,d.off("scroll",s),d.off("touchmove",s),d.off("resize",s),y.stickyClass&&c.removeClass(y.stickyClass),c.css({position:"",top:"",left:"",width:""}),a.remove()}))})}}(jQuery);