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:
Vendored
+2
-2
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user