Skip to content

Commit

Permalink
no need to check for href attribute on the scrollable element
Browse files Browse the repository at this point in the history
  • Loading branch information
mikegreiling authored and cvrebert committed Jun 8, 2014
1 parent 0be4109 commit 632313d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions js/scrollspy.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@
// ==========================

function ScrollSpy(element, options) {
var href
var process = $.proxy(this.process, this)

this.$element = $(element).is('body') ? $(window) : $(element)
this.$body = $('body')
this.$scrollElement = this.$element.on('scroll.bs.scrollspy', process)
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
this.selector = (this.options.target
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|| '') + ' .nav li > a'
this.selector = (this.options.target || '') + ' .nav li > a'
this.offsets = []
this.targets = []
this.activeTarget = null
Expand Down

0 comments on commit 632313d

Please sign in to comment.