Skip to content

Instantly share code, notes, and snippets.

@ghorvat
Created November 7, 2016 09:54
Show Gist options
  • Save ghorvat/98e3f7b230babc3755aced22f6b348b7 to your computer and use it in GitHub Desktop.
Save ghorvat/98e3f7b230babc3755aced22f6b348b7 to your computer and use it in GitHub Desktop.
if(items.length > 1) {
clones.push(clones.length / 2);
this.$stage.append(items[clones[clones.length - 1]].clone().addClass('cloned'));
clones.push(items.length - 1 - (clones.length - 1) / 2);
this.$stage.prepend(items[clones[clones.length - 1]].clone().addClass('cloned'));
} else {
this.settings.loop = false;
this.settings.nav = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment