如何做到这一点?我有这个动画.css的代码(http://justinaguilar.com/animations/):
$(document).ready(function(){
var divAn = $('#an-container #forAnimation');
$(window).scroll(function() {
divAn.each(function(){
var imagePos = $(this).offset().top;
var topOfWindow = $(window).scrollTop();
if (imagePos < topOfWindow+300) {
var animation = $(this).attr('animate');
if ( $(this).attr('animate') == null) animation = 'slideUp';
$(this).addClass(animation);
}
});
});
});
如何在fullPage.js中使用afterLoad正确写入(https://github.com/alvarotrigo/fullPage.js#callbacks):function (anchor Link, index) {....
您可以使用fullpage.js的fullpage.jss选项scrollBar:true
,这样滚动事件就会被触发。