]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
cache $(href) lookup
authorJacob Thornton <jacobthornton@gmail.com>
Thu, 22 Mar 2012 06:51:32 +0000 (23:51 -0700)
committerJacob Thornton <jacobthornton@gmail.com>
Thu, 22 Mar 2012 06:51:32 +0000 (23:51 -0700)
docs/assets/bootstrap.zip
docs/assets/js/bootstrap-scrollspy.js
js/bootstrap-scrollspy.js

index caf293653ee23322f8edc4c8bf271cb607c79b2a..72d0da00655f40c2578cbfef621c069c6e03e2f9 100644 (file)
Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ
index 5008b0fe97cd2141e67c71973fb83342281127e4..487e6818b1847999e9c283cebd65181f0cbe5d03 100644 (file)
           .find(this.selector)
           .map(function () {
             var href = $(this).attr('href')
-            return /^#\w/.test(href)
-              && $(href).length
-              && [[ $(href).position().top, href ]]
+              , $href = /^#\w/.test(href) && $(href)
+            return $href
+              && href.length
+              && [[ $href.position().top, href ]]
           })
           .sort(function (a, b) { return a[0] - b[0] })
           .each(function () {
index 5008b0fe97cd2141e67c71973fb83342281127e4..487e6818b1847999e9c283cebd65181f0cbe5d03 100644 (file)
           .find(this.selector)
           .map(function () {
             var href = $(this).attr('href')
-            return /^#\w/.test(href)
-              && $(href).length
-              && [[ $(href).position().top, href ]]
+              , $href = /^#\w/.test(href) && $(href)
+            return $href
+              && href.length
+              && [[ $href.position().top, href ]]
           })
           .sort(function (a, b) { return a[0] - b[0] })
           .each(function () {