From 7e718d9d44add622fe3c409f1b2bb7ff75d4f434 Mon Sep 17 00:00:00 2001 From: git-marijus Date: Wed, 21 Dec 2016 14:31:39 +0100 Subject: [PATCH] parent_height should respect eventual margins --- sticky-kit.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sticky-kit.coffee b/sticky-kit.coffee index 3e34af4..9b867ff 100644 --- a/sticky-kit.coffee +++ b/sticky-kit.coffee @@ -68,7 +68,7 @@ $.fn.stick_in_parent = (opts={}) -> padding_bottom = parseInt parent.css("padding-bottom"), 10 parent_top = parent.offset().top + border_top + padding_top - parent_height = parent.height() + parent_height = parent.outerHeight true if fixed fixed = false