Skip to content

Commit

Permalink
Merge pull request #91 from BigDub/gh-pages
Browse files Browse the repository at this point in the history
Fixed slider error
  • Loading branch information
kvngard committed Sep 11, 2014
2 parents c9b7c7d + 5cf5d2f commit 7146603
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/slider.min.js

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

4 changes: 3 additions & 1 deletion src/js/slider-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
// load first cloned slide #0
loadImg(slider, 0);
// load last cloned slide #6
loadImg(slider, slider.pages+1);
loadImg(slider, slider.pages-1);
// trigger slide complete to preload the next slide image
slider.$el.trigger('slide_complete', slider);

Expand All @@ -79,6 +79,8 @@
onSlideComplete: function(slider) {
// *** PRELOAD THE NEXT SLIDE IMAGE ***
loadImg(slider, slider.currentPage + 1);
// *** PRELOAD THE PREVIOUS SLIDE IMAGE ***
loadImg(slider, slider.currentPage - 2);
}

// Interactivity
Expand Down

0 comments on commit 7146603

Please sign in to comment.