Mercurial > wikked
comparison static/bootstrap/js/bootstrap-scrollspy.js @ 88:a5a3d454eac9
Updated Bootstrap.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Fri, 05 Apr 2013 08:08:12 -0700 |
parents | 130eccd396d8 |
children |
comparison
equal
deleted
inserted
replaced
87:c0cf67362fb1 | 88:a5a3d454eac9 |
---|---|
1 /* ============================================================= | 1 /* ============================================================= |
2 * bootstrap-scrollspy.js v2.2.2 | 2 * bootstrap-scrollspy.js v2.3.1 |
3 * http://twitter.github.com/bootstrap/javascript.html#scrollspy | 3 * http://twitter.github.com/bootstrap/javascript.html#scrollspy |
4 * ============================================================= | 4 * ============================================================= |
5 * Copyright 2012 Twitter, Inc. | 5 * Copyright 2012 Twitter, Inc. |
6 * | 6 * |
7 * Licensed under the Apache License, Version 2.0 (the "License"); | 7 * Licensed under the Apache License, Version 2.0 (the "License"); |
57 var $el = $(this) | 57 var $el = $(this) |
58 , href = $el.data('target') || $el.attr('href') | 58 , href = $el.data('target') || $el.attr('href') |
59 , $href = /^#\w/.test(href) && $(href) | 59 , $href = /^#\w/.test(href) && $(href) |
60 return ( $href | 60 return ( $href |
61 && $href.length | 61 && $href.length |
62 && [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null | 62 && [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null |
63 }) | 63 }) |
64 .sort(function (a, b) { return a[0] - b[0] }) | 64 .sort(function (a, b) { return a[0] - b[0] }) |
65 .each(function () { | 65 .each(function () { |
66 self.offsets.push(this[0]) | 66 self.offsets.push(this[0]) |
67 self.targets.push(this[1]) | 67 self.targets.push(this[1]) |