1// Sticky Plugin v1.0.0 for jQuery 2// ============= 3// Author: Anthony Garand 4// Improvements by German M. Bravo (Kronuz) and Ruud Kamphuis (ruudk) 5// Improvements by Leonardo C. Daronco (daronco) 6// Created: 2/14/2011 7// Date: 2/12/2012 8// Website: http://labs.anthonygarand.com/sticky 9// Description: Makes an element on the page stick on the screen as you scroll 10// It will only set the 'top' and 'position' of your element, you 11// might need to adjust the width in some cases. 12!function(t){var e={topSpacing:0,bottomSpacing:0,className:"is-sticky",wrapperClassName:"sticky-wrapper",center:!1,getWidthFrom:""},i=t(window),n=t(document),s=[],o=i.height(),a=function(){for(var e=i.scrollTop(),a=n.height(),r=a-o,c=e>r?r-e:0,p=0;p<s.length;p++){var d=s[p],l=d.stickyWrapper.offset().top,h=l-d.topSpacing-c;if(h>=e)null!==d.currentTop&&(d.stickyElement.css("position","").css("top",""),d.stickyElement.parent().removeClass(d.className),d.currentTop=null);else{var u=a-d.stickyElement.outerHeight()-d.topSpacing-d.bottomSpacing-e-c;0>u?u+=d.topSpacing:u=d.topSpacing,d.currentTop!=u&&(d.stickyElement.css("position","fixed").css("width","100%").css("background","#c2183c").css("top",u),"undefined"!=typeof d.getWidthFrom&&d.stickyElement.css("width",t(d.getWidthFrom).width()),d.stickyElement.parent().addClass(d.className),d.currentTop=u)}}},r=function(){o=i.height()},c={init:function(i){var n=t.extend(e,i);return this.each(function(){var e=t(this),i=e.attr("id"),o=t("<div></div>").attr("id",i+"-sticky-wrapper").addClass(n.wrapperClassName);e.wrapAll(o),n.center&&e.parent().css({width:e.outerWidth(),marginLeft:"auto",marginRight:"auto"}),"right"==e.css("float")&&e.css({"float":"none"}).parent().css({"float":"right"});var a=e.parent();a.css("",e.outerHeight()),s.push({topSpacing:n.topSpacing,bottomSpacing:n.bottomSpacing,stickyElement:e,currentTop:null,stickyWrapper:a,className:n.className,getWidthFrom:n.getWidthFrom})})},update:a};window.addEventListener?(window.addEventListener("scroll",a,!1),window.addEventListener("resize",r,!1)):window.attachEvent&&(window.attachEvent("onscroll",a),window.attachEvent("onresize",r)),t.fn.sticky=function(e){return c[e]?c[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void t.error("Method "+e+" does not exist on jQuery.sticky"):c.init.apply(this,arguments)},t(function(){setTimeout(a,0)})}(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.