Essentially, I need scrollify to stop running once it gets to the first section, then start running again once the first section's animations are complete. I have tried stop(); but with no luck. Any help is greatly appreciated.
$(function() {
$('.section-image1').hide();
$('.section-image2').hide();
$('.section-image3').hide();
$.scrollify({
section: ".header-home",
section: ".section",
before: function(section){
console.log(section);
if(section==1){
//stop scrollify
$(window).scroll(function(){
$('.section-image1').show();
$('.section-image2').show();
$('.section-image3').show();
$('.section-image1').addClass('fadeInUp');
$('.section-image2').addClass('fadeInUp');
$('.section-image3').addClass('fadeInUp');
});
//start scrollify
if(section==2){
//stop scrollify
$(window).scroll(function(){
$('.section-image4').show();
$('.section-image5').show();
$('.section-image6').show();
$('.section-image4').addClass('fadeInUp');
$('.section-image5').addClass('fadeInUp');
$('.section-image6').addClass('fadeInUp');
});
}
}
});
});