Skip to content

Commit

Permalink
Fixed flesler#20
Browse files Browse the repository at this point in the history
  • Loading branch information
flesler committed Feb 15, 2014
1 parent 13d2f2f commit 9610cda
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery.localScroll",
"version": "1.3.4",
"version": "1.3.5",
"description": "Animated anchor navigation made easy.",
"homepage": "https://github.com/flesler/jquery.localScroll",
"main": [
Expand Down
4 changes: 4 additions & 0 deletions changes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.3.5
[Fix]
- Fixed when lazy true, links with 2+ levels of nested elements won't work, now using $().on()

1.3.4
[Misc]
- Turned into an unnamed AMD module and drop explicit requirement for jquery.scrollTo
Expand Down
12 changes: 5 additions & 7 deletions jquery.localScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under MIT
* http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html
* @author Ariel Flesler
* @version 1.3.4
* @version 1.3.5
*/
;(function(plugin) {
// AMD Support
Expand Down Expand Up @@ -47,12 +47,10 @@

return settings.lazy ?
// use event delegation, more links can be added later.
this.bind(settings.event, function(e) {
// Could use closest(), but that would leave out jQuery -1.3.x
var a = $([e.target, e.target.parentNode]).filter(filter)[0];
// if a valid link was clicked
if (a)
scroll(e, a, settings); // do scroll.
this.on(settings.event, 'a,area', function(e) {
if (filter.call(this)) {
scroll(e, this, settings);
}
}) :
// bind concretely, to each matching link
this.find('a,area')
Expand Down
4 changes: 2 additions & 2 deletions jquery.localScroll.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion localScroll.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"title": "Ariel Flesler's jQuery localScroll",
"description": "Animated anchor navigation made easy.",
"keywords": ["browser", "animated", "animation", "scrolling", "scroll", "links", "anchors"],
"version": "1.3.4",
"version": "1.3.5",
"author": {
"name": "Ariel Flesler",
"email": "[email protected]",
Expand Down

0 comments on commit 9610cda

Please sign in to comment.