text: angular.module("sticky",[]).directive("sticky",["$timeout",function(o){return{restrict:"A",scope:{offset:"@"},link:function(n,t){o(function(){function i(){c=t[0].offsetTop-u,s()}function s(){f=(window.pageYOffset||p.scrollTop)-(p.clientTop||0),c>f?t.css("position",r):t.css("position","fixed")}function e(){t.css("position",r),o(i)}var c,f,u=n.offset||0,l=angular.element(window),p=document.documentElement,r=t.css("position");t.css("top",u+"px"),l.on("scroll",s),l.on("resize",e),i()})}}}]);