From 20e085723b3f55fdc1db7f1687d535af7d127319 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Wed, 21 Mar 2012 23:51:32 -0700 Subject: cache $(href) lookup --- docs/assets/bootstrap.zip | Bin 55964 -> 55979 bytes docs/assets/js/bootstrap-scrollspy.js | 7 ++++--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip index caf293653..72d0da006 100644 Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ diff --git a/docs/assets/js/bootstrap-scrollspy.js b/docs/assets/js/bootstrap-scrollspy.js index 5008b0fe9..487e6818b 100644 --- a/docs/assets/js/bootstrap-scrollspy.js +++ b/docs/assets/js/bootstrap-scrollspy.js @@ -53,9 +53,10 @@ .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 () { -- cgit v1.2.3