- commit
- 72350acb534927430fe86aa668f4be4fab82e3c1
- parent
- 690259a8d52ac0bf949a1fec845dfaa1b63a0d43
- Author
- Pierre Spring <pierre@nelm.io>
- Date
- 2014-03-20 16:29
handle absolute positioned elements
Diffstat
| M | jquery.sticky-kit.coffee | 3 | ++- |
1 files changed, 2 insertions, 1 deletions
diff --git a/jquery.sticky-kit.coffee b/jquery.sticky-kit.coffee
@@ -23,6 +23,7 @@ $.fn.stick_in_parent = (opts={}) ->
23 23
24 24 fixed = false
25 25 spacer = $("<div />")
-1 26 spacer.css('position', elm.css('position'))
26 27
27 28 recalc = ->
28 29 border_top = parseInt parent.css("border-top-width"), 10
@@ -148,7 +149,7 @@ $.fn.stick_in_parent = (opts={}) ->
148 149 elm.css({
149 150 position: "absolute"
150 151 bottom: padding_bottom
151 -1 top: ""
-1 152 top: "auto"
152 153 }).trigger("sticky_kit:bottom")
153 154
154 155 recalc_and_tick = ->