2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

allow scrollspy to target a specific nav

This commit is contained in:
Jacob Thornton
2011-11-25 17:30:52 -08:00
parent 98fddaa355
commit bd8745a98b
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -26,10 +26,10 @@
function ScrollSpy( element ) {
var process = $.proxy(this.process, this)
this.selector = '.nav li > a'
this.$body = $('body').delegate(this.selector, 'click.scroll.data-api', process)
this.$scrollElement = $(element).bind('scroll.scroll.data-api', process)
this.selector = (this.$scrollElement.attr('data-target') || '') + ' .nav li > a'
this.$body = $('body').delegate(this.selector, 'click.scroll.data-api', process)
this.refresh()
this.process()