From b53357058b15354d07cd72b00a4a3756ec2fceec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Folles=C3=B8?=
Date: Wed, 19 Feb 2014 15:25:09 +0100
Subject: [PATCH 001/253] Add offsettTop to offsetHeight for scrollHeader
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
If you have multiple fixed headers, it’s not enough to calculate the
headerHeight as the height of the sticky header element. We need to add
the offsetTop to compensate for the first sticky header.
---
smooth-scroll.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/smooth-scroll.js b/smooth-scroll.js
index d2307a6..129375d 100755
--- a/smooth-scroll.js
+++ b/smooth-scroll.js
@@ -47,7 +47,7 @@ window.smoothScroll = (function (window, document, undefined) {
// Get the height of a fixed header if one exists
var scrollHeader = document.querySelector('[data-scroll-header]');
- var headerHeight = scrollHeader === null ? 0 : scrollHeader.offsetHeight;
+ var headerHeight = scrollHeader === null ? 0 : (scrollHeader.offsetHeight + scrollHeader.offsetTop);
// Set the animation variables to 0/undefined.
var timeLapsed = 0;
From bb4106c99c54ea0ee9acb51944ed0fc8a2ca2b4a Mon Sep 17 00:00:00 2001
From: Chris Ferdinandi
Date: Wed, 19 Feb 2014 18:30:36 -0500
Subject: [PATCH 002/253] Updated version number
---
README.md | 2 ++
smooth-scroll.js | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index d184b0a..f077734 100755
--- a/README.md
+++ b/README.md
@@ -5,6 +5,8 @@ A simple script to animate scrolling to anchor links. Easing support contributed
Getting started with Smooth Scroll is really easy. [View the online tutorial](http://cferdinandi.github.com/smooth-scroll/) or dig through the `index.html` file.
## Changelog
+* v3.3 (February 19, 2014)
+ * [Add `offsettTop` to `offsetHeigh`t for `scrollHeader`. Allows for multiple fixed headers, or a fixed header that sits slightly below the top of the page.](https://github.com/cferdinandi/smooth-scroll/pull/36)
* v3.2 (February 10, 2014)
* [Fixes iOS infinite loop](https://github.com/cferdinandi/smooth-scroll/pull/35) and [Chrome browser zoom](https://github.com/cferdinandi/smooth-scroll/issues/31) bugs.
* v3.1 (February 4, 2014)
diff --git a/smooth-scroll.js b/smooth-scroll.js
index 129375d..107ea49 100755
--- a/smooth-scroll.js
+++ b/smooth-scroll.js
@@ -1,6 +1,6 @@
/* =============================================================
- Smooth Scroll 3.2
+ Smooth Scroll v3.3
Animate scrolling to anchor links, by Chris Ferdinandi.
http://gomakethings.com
From 550449278504fe4624575862e54c7c6bb87c6d18 Mon Sep 17 00:00:00 2001
From: Chris Ferdinandi
Date: Fri, 21 Feb 2014 23:36:52 -0500
Subject: [PATCH 003/253] Redesigned script structure
https://github.com/cferdinandi/kraken/issues/38
---
index.html | 39 ++++---
smooth-scroll.js | 257 +++++++++++++++++++++++++++--------------------
2 files changed, 172 insertions(+), 124 deletions(-)
diff --git a/index.html b/index.html
index 77cc863..3e2268b 100644
--- a/index.html
+++ b/index.html
@@ -19,31 +19,31 @@ Smooth Scroll
Linear
- Linear (no other options)
+ Linear (no other options)
Ease-In
- Quad
- Cubic
- Quart
- Quint
+ Quad
+ Cubic
+ Quart
+ Quint
Ease-In-Out
- Quad
- Cubic
- Quart
- Quint
+ Quad
+ Cubic
+ Quart
+ Quint
Ease-Out
- Quad
- Cubic
- Quart
- Quint
+ Quad
+ Cubic
+ Quart
+ Quint
@@ -52,7 +52,7 @@
Smooth Scroll
.
.
.
.
.
.
.
.
.
.
.
.
.
- Bazinga!
+ Bazinga!
.
.
.
.
.
.
.
.
.
.
.
.
.
@@ -60,13 +60,22 @@
Smooth Scroll
.
.
.
.
.
.
.
.
.
.
.
.
.
- Back to the top
+ Back to the top
+