Skip to content

Instantly share code, notes, and snippets.

@dmackerman
Created December 21, 2011 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmackerman/1507496 to your computer and use it in GitHub Desktop.
Save dmackerman/1507496 to your computer and use it in GitHub Desktop.
availableRoutes() function to determine where we can go.
function availableRoutes() {
var horizontalSlides = document.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR);
var verticalSlides = document.querySelectorAll(VERTICAL_SLIDES_SELECTOR);
return {
left: indexh > 0,
right: indexh < horizontalSlides.length - 1,
up: indexv > 0,
down: indexv < verticalSlides.length - 1
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment