aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2014-05-12 19:57:49 -0700
committerMark Otto <[email protected]>2014-05-12 19:57:49 -0700
commit31956be6ef6d1b1a2537c3441e69120ef3c99a2b (patch)
treea118376f0f415826265828377904778f8e788b44 /js
parent510f4fe50ad30499adf1d19dd65ef694c414aacd (diff)
parentbe18f50fd0e36e35342a100216b01fe00692d0db (diff)
downloadbootstrap-31956be6ef6d1b1a2537c3441e69120ef3c99a2b.tar.xz
bootstrap-31956be6ef6d1b1a2537c3441e69120ef3c99a2b.zip
Merge branch 'master' into icon_paths
Conflicts: dist/css/bootstrap-rtl.css dist/css/bootstrap.css.map dist/js/bootstrap.min.js docs/dist/css/bootstrap.css.map docs/dist/js/bootstrap.min.js
Diffstat (limited to 'js')
-rw-r--r--js/affix.js2
-rw-r--r--js/scrollspy.js1
2 files changed, 2 insertions, 1 deletions
diff --git a/js/affix.js b/js/affix.js
index 992ae7ff1..270b039bf 100644
--- a/js/affix.js
+++ b/js/affix.js
@@ -82,7 +82,7 @@
.trigger($.Event(affixType.replace('affix', 'affixed')))
if (affix == 'bottom') {
- this.$element.offset({ top: position.top })
+ this.$element.offset({ top: scrollHeight - this.$element.height() - offsetBottom })
}
}
diff --git a/js/scrollspy.js b/js/scrollspy.js
index 1f9153552..4ba733e78 100644
--- a/js/scrollspy.js
+++ b/js/scrollspy.js
@@ -46,6 +46,7 @@
this.$body
.find(this.selector)
+ .filter(':visible')
.map(function () {
var $el = $(this)
var href = $el.data('target') || $el.attr('href')