Commit 632313d6 authored by Mike Greiling's avatar Mike Greiling Committed by Chris Rebert
Browse files

no need to check for href attribute on the scrollable element

parent 0be41096
Showing with 1 addition and 4 deletions
+1 -4
...@@ -14,16 +14,13 @@ ...@@ -14,16 +14,13 @@
// ========================== // ==========================
function ScrollSpy(element, options) { function ScrollSpy(element, options) {
var href
var process = $.proxy(this.process, this) var process = $.proxy(this.process, this)
this.$element = $(element).is('body') ? $(window) : $(element) this.$element = $(element).is('body') ? $(window) : $(element)
this.$body = $('body') this.$body = $('body')
this.$scrollElement = this.$element.on('scroll.bs.scrollspy', process) this.$scrollElement = this.$element.on('scroll.bs.scrollspy', process)
this.options = $.extend({}, ScrollSpy.DEFAULTS, options) this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
this.selector = (this.options.target this.selector = (this.options.target || '') + ' .nav li > a'
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|| '') + ' .nav li > a'
this.offsets = [] this.offsets = []
this.targets = [] this.targets = []
this.activeTarget = null this.activeTarget = null
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment