diff options
| author | XhmikosR <[email protected]> | 2014-06-07 09:13:05 +0300 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2014-06-07 09:13:05 +0300 |
| commit | 3b99a41246cb25b1fba79d14007ed0238409e63f (patch) | |
| tree | cdd3f6ba9afca51d0c8085b176984496bf1176b7 /js/scrollspy.js | |
| parent | 3cbbc70d55aeff62f5b53929b60439f7cc960e19 (diff) | |
| parent | 03a8949d7c7937dd56da0802acbbded1ee27152f (diff) | |
| download | bootstrap-3b99a41246cb25b1fba79d14007ed0238409e63f.tar.xz bootstrap-3b99a41246cb25b1fba79d14007ed0238409e63f.zip | |
Merge pull request #13388 from twbs/xhmikosr-js-style
Improve JS style
Diffstat (limited to 'js/scrollspy.js')
| -rw-r--r-- | js/scrollspy.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/js/scrollspy.js b/js/scrollspy.js index 53e1c48ba..cddde45ad 100644 --- a/js/scrollspy.js +++ b/js/scrollspy.js @@ -43,7 +43,6 @@ this.offsets = $([]) this.targets = $([]) - var self = this this.$body @@ -57,7 +56,7 @@ return ($href && $href.length && $href.is(':visible') - && [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null + && [[$href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href]]) || null }) .sort(function (a, b) { return a[0] - b[0] }) .each(function () { @@ -87,7 +86,7 @@ activeTarget != targets[i] && scrollTop >= offsets[i] && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) - && this.activate( targets[i] ) + && this.activate(targets[i]) } } |
