]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
no need to check for href attribute on the scrollable element
authorMike Greiling <mike@pixelcog.com>
Thu, 29 May 2014 07:30:18 +0000 (02:30 -0500)
committerChris Rebert <code@rebertia.com>
Sun, 8 Jun 2014 01:09:53 +0000 (18:09 -0700)
js/scrollspy.js

index de4f98707660120c27ee00e19a1efd56b4a31e98..db493d7ed5b9167ccee55149f273b32c5d0be5bb 100644 (file)
   // ==========================
 
   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