aboutsummaryrefslogtreecommitdiff
path: root/js/bootstrap-scrollspy.js
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2011-11-27 17:04:55 -0800
committerJacob Thornton <[email protected]>2011-11-27 17:04:55 -0800
commit46fe38386afce7149810b1feb534726735ce28b2 (patch)
treec6a8b8e5c27a0aa30491f95505d7ed431845c5c7 /js/bootstrap-scrollspy.js
parent3925ea9986e70f5a87883563c47c8ecd3d631c02 (diff)
downloadbootstrap-46fe38386afce7149810b1feb534726735ce28b2.tar.xz
bootstrap-46fe38386afce7149810b1feb534726735ce28b2.zip
rename tabs to tab - clean up lots of api stuff make href acceptable target val
Diffstat (limited to 'js/bootstrap-scrollspy.js')
-rw-r--r--js/bootstrap-scrollspy.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/bootstrap-scrollspy.js b/js/bootstrap-scrollspy.js
index e4bfea483..fe34019ff 100644
--- a/js/bootstrap-scrollspy.js
+++ b/js/bootstrap-scrollspy.js
@@ -28,7 +28,9 @@
var process = $.proxy(this.process, this)
this.$scrollElement = $(element).bind('scroll.scroll.data-api', process)
- this.selector = (this.$scrollElement.attr('data-target') || '') + ' .nav li > a'
+ this.selector = (this.$scrollElement.attr('data-target')
+ || this.$scrollElement.attr('href')
+ || '') + ' .nav li > a'
this.$body = $('body').delegate(this.selector, 'click.scroll.data-api', process)
this.refresh()