Skip to content

Commit

Permalink
Merge pull request #158 from peterdemin/master
Browse files Browse the repository at this point in the history
Provide current index fallback merged. Thanks!
  • Loading branch information
peachananr committed Jun 4, 2014
2 parents 8ef53b0 + 5a8dcd0 commit 6c27946
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jquery.onepage-scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@

$.fn.moveDown = function() {
var el = $(this)
index = $(settings.sectionContainer +".active").data("index");
index = $(settings.sectionContainer +".active").data("index") || 1;
current = $(settings.sectionContainer + "[data-index='" + index + "']");
next = $(settings.sectionContainer + "[data-index='" + (index + 1) + "']");
if(next.length < 1) {
Expand Down Expand Up @@ -340,4 +340,4 @@
}
return false;
}
}));
}));

0 comments on commit 6c27946

Please sign in to comment.