From ab10cfd47d32ae01f512b5d93f187c66bd207bbd Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Wed, 22 Jul 2015 12:32:07 -0700 Subject: [PATCH] Ensure the spacer is hidden when the element is not visible. --- jquery-scrolltofixed.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jquery-scrolltofixed.js b/jquery-scrolltofixed.js index 2231301..aee7fa0 100644 --- a/jquery-scrolltofixed.js +++ b/jquery-scrolltofixed.js @@ -386,6 +386,9 @@ if(target.is(':visible')) { isReset = false; checkScroll(); + } else { + // Ensure the spacer is hidden + setUnfixed(); } }