diff --git a/js/bootstrap-scrollspy.js b/js/bootstrap-scrollspy.js
index fd82872c5cb0ca2abbea79998c1d7a6689720b9f..07a5c3a5842a30cc41e05da8e99c835152c03063 100644
--- a/js/bootstrap-scrollspy.js
+++ b/js/bootstrap-scrollspy.js
@@ -59,7 +59,7 @@
               , $href = /^#\w/.test(href) && $(href)
             return ( $href
               && $href.length
-              && [[ $href.position().top, href ]] ) || null
+              && [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null
           })
           .sort(function (a, b) { return a[0] - b[0] })
           .each(function () {