From: Mike Greiling Date: Thu, 29 May 2014 07:30:18 +0000 (-0500) Subject: no need to check for href attribute on the scrollable element X-Git-Tag: v3.2.0~122^2~9^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=632313d631b51d96557bb6576c0b41e33cbfb009;p=thirdparty%2Fbootstrap.git no need to check for href attribute on the scrollable element --- diff --git a/js/scrollspy.js b/js/scrollspy.js index de4f987076..db493d7ed5 100644 --- a/js/scrollspy.js +++ b/js/scrollspy.js @@ -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