Skip to content

Commit f298130

Browse files
author
Chris Ferdinandi
committed
Merge pull request cferdinandi#73 from a-v-l/master
Fixed problem with `toggles` containing a URL before the fragment identifier
2 parents 726cb9a + 35ea8e9 commit f298130

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ Smooth Scroll is licensed under the [MIT License](http://gomakethings.com/mit/).
203203

204204
## Changelog
205205

206+
* v4.8.1 - June 27, 2014
207+
* Fixed problem with `toggles` containing a URL before the fragment identifier
206208
* v4.8.0 - June 21, 2014
207209
* Converted to gulp.js workflow.
208210
* Added unit testing.

dist/js/smooth-scroll.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* smooth-scroll v4.8.0
2+
* smooth-scroll v4.8.1
33
* Animate scrolling to anchor links, by Chris Ferdinandi.
44
* http://github.com/cferdinandi/smooth-scroll
55
*
@@ -281,7 +281,7 @@
281281

282282
// When a toggle is clicked, run the click handler
283283
forEach(toggles, function (toggle) {
284-
toggle.addEventListener('click', exports.animateScroll.bind( null, toggle, toggle.getAttribute('href'), settings ), false);
284+
toggle.addEventListener('click', exports.animateScroll.bind( null, toggle, toggle.hash, settings ), false);
285285
});
286286

287287
};

dist/js/smooth-scroll.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "smooth-scroll",
3-
"version": "4.8.0",
3+
"version": "4.8.1",
44
"description": "Animate scrolling to anchor links",
55
"author": {
66
"name": "Chris Ferdinandi",

src/js/smooth-scroll.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272

273273
// When a toggle is clicked, run the click handler
274274
forEach(toggles, function (toggle) {
275-
toggle.addEventListener('click', exports.animateScroll.bind( null, toggle, toggle.getAttribute('href'), settings ), false);
275+
toggle.addEventListener('click', exports.animateScroll.bind( null, toggle, toggle.hash, settings ), false);
276276
});
277277

278278
};

0 commit comments

Comments
 (0)