- commit
- 5c198a266b6e0a34939d66f0b6b2902ec90bafa7
- parent
- ba175f1f5ac6beac6af37779e68ddc807edb7880
- Author
- leaf <leafot@gmail.com>
- Date
- 2014-03-27 06:53
Merge pull request #39 from caillou/bottomed-recalc-bug Bottomed recalc bug
Diffstat
| M | jquery.sticky-kit.coffee | 4 | +++- |
1 files changed, 3 insertions, 1 deletions
diff --git a/jquery.sticky-kit.coffee b/jquery.sticky-kit.coffee
@@ -22,6 +22,7 @@ $.fn.stick_in_parent = (opts={}) ->
22 22 throw "failed to find stick parent" unless parent.length
23 23
24 24 fixed = false
-1 25 bottomed = false
25 26 spacer = $("<div />")
26 27 spacer.css('position', elm.css('position'))
27 28
@@ -35,10 +36,12 @@ $.fn.stick_in_parent = (opts={}) ->
35 36
36 37 restore = if fixed
37 38 fixed = false
-1 39 bottomed = false
38 40 elm.insertAfter(spacer).css {
39 41 position: ""
40 42 top: ""
41 43 width: ""
-1 44 bottom: ""
42 45 }
43 46 spacer.detach()
44 47 true
@@ -62,7 +65,6 @@ $.fn.stick_in_parent = (opts={}) ->
62 65 recalc()
63 66 return if height == parent_height
64 67
65 -1 bottomed = false
66 68 last_pos = undefined
67 69 offset = offset_top
68 70