From bb5688334dd6943967b36f7ad67c3b1ac9d1614d Mon Sep 17 00:00:00 2001 From: Aubrey Hewes Date: Mon, 4 Jul 2016 12:00:21 +0200 Subject: [PATCH] Fix MSEdge where element offset.top is negative When sticky the element top can be a negative amount (i.e. -0.17) --- jquery.sticky.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.sticky.js b/jquery.sticky.js index b3805c8..259209f 100644 --- a/jquery.sticky.js +++ b/jquery.sticky.js @@ -48,7 +48,7 @@ for (var i = 0, l = sticked.length; i < l; i++) { var s = sticked[i], - elementTop = s.stickyWrapper.offset().top, + elementTop = parseInt(s.stickyWrapper.offset().top, 10), etse = elementTop - s.topSpacing - extra; //update height in case of dynamic content