Skip to content

Instantly share code, notes, and snippets.

@nathanaelphilip
Created February 7, 2014 18:25
Show Gist options
  • Save nathanaelphilip/8868672 to your computer and use it in GitHub Desktop.
Save nathanaelphilip/8868672 to your computer and use it in GitHub Desktop.
$(function() {
$.stellar({
horizontalScrolling: false,
});
// slides
var swipe_brian = new Swipe(document.getElementById('swipe-brian'), {
speed: 600,
auto: 0,
continuous: true,
disableScroll: false,
stopPropagation: false,
callback: function(index, elem) {},
transitionEnd: function(index, elem) {}
});
$('.next-slide').on('click',function(event){
event.preventDefault();
var index = $(this).data('index');
var target = $(this).attr('href');
if (target == '#swipe-brian') {
swipe_brian.slide(1);
}
})
$('.back-slide').on('click',function(event){
event.preventDefault();
var index = $(this).data('index');
var target = $(this).attr('href');
if (target == '#swipe-brian') {
swipe_brian.slide(0);
}
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment