relatively-sticky

A jQuery plugin for creating smart sticky elements
git clone https://git.ce9e.org/relatively-sticky.git

commit
f6d9ed596bf183de29d5686afd4c410597a6324c
parent
5326bed4a09d829a7b78062f5b08b7d101176553
Author
leaf corcoran <leafot@gmail.com>
Date
2013-08-01 08:03
add version to file

Diffstat

M jquery.sticky-kit.coffee 2 +-
M jquery.sticky-kit.js 2 +-
M jquery.sticky-kit.min.js 2 +-

3 files changed, 3 insertions, 3 deletions


diff --git a/jquery.sticky-kit.coffee b/jquery.sticky-kit.coffee

@@ -1,5 +1,5 @@
    1     1 ###*
    2    -1 @license WTFPL | Leaf Corcoran 2013 | http://leafo.net
   -1     2 @license Sticky-kit v0.0.1 | WTFPL | Leaf Corcoran 2013 | http://leafo.net
    3     3 ###
    4     4 
    5     5 $ = @jQuery

diff --git a/jquery.sticky-kit.js b/jquery.sticky-kit.js

@@ -1,7 +1,7 @@
    1     1 // Generated by CoffeeScript 1.4.0
    2     2 
    3     3 /**
    4    -1 @license WTFPL | Leaf Corcoran 2013 | http://leafo.net
   -1     4 @license Sticky-kit v0.0.1 | WTFPL | Leaf Corcoran 2013 | http://leafo.net
    5     5 */
    6     6 
    7     7 

diff --git a/jquery.sticky-kit.min.js b/jquery.sticky-kit.min.js

@@ -1,5 +1,5 @@
    1     1 /*
    2    -1  WTFPL | Leaf Corcoran 2013 | http://leafo.net
   -1     2  Sticky-kit v0.0.1 | WTFPL | Leaf Corcoran 2013 | http://leafo.net
    3     3 */
    4     4 (function(){var g,s;g=this.jQuery;s=g(window);g.fn.stick_in_parent=function(e){var t,c,p,A,k,B;null==e&&(e={});p=e.sticky_class;t=e.inner_scrolling;c=e.parent;null==c&&(c=void 0);null==t&&(t=!0);null==p&&(p="is_stuck");A=function(a,e,k,u,w,l){var n,q,f,v,b,d,x,y,r,z;d=a.parent();null!=c&&(d=d.closest(c));if(!d.length)throw"failed to find stick parent";x=function(){var b,f;b=parseInt(d.css("border-top-width"),10);f=parseInt(d.css("padding-top"),10);e=parseInt(d.css("padding-bottom"),10);k=d.offset().top+
    5     5 b+f;u=d.height();w=a.offset().top-parseInt(a.css("margin-top"),10);return l=a.outerHeight(!0)};x();if(l!==u)return f=a.css("float"),r=g("<div />").css({width:a.outerWidth(!0),height:l,display:a.css("display"),"float":f}),n=q=!1,v=void 0,b=0,y=!1,z=function(){var h,g,m,c;m=s.scrollTop();null!=v&&(g=m-v);v=m;q?(c=m+l+b>u+k,n&&!c&&(n=!1,a.css({position:"fixed",bottom:"",top:0}).trigger("sticky_kit:unbottom")),m<w&&(q=!1,b=0,"left"!==f&&"right"!==f||a.insertAfter(r),r.detach(),h={position:""},y&&(h.width=