0
我將選項觸發器設置爲true,如果我從開始(頁面頂部)開始滾動並開始向下滾動,它就像魅力一樣工作。路點在刷新後不會觸發以上目標元素
但是,如果我刷新頁面底部的頁面並開始向上滾動,它不會像從頁面頂部向下滾動時那樣觸發上述目標元素。
這裏我的代碼:
$('.anim').each(function(index, elHtml) {
var el = $(this);
// console.log($(this), el);
var _animation = el.data('animation'),
_duration = el.data('duration') ? el.data('duration') : 1000,
_offset = el.data('offset') ? el.data('offset') : 'bottom-in-view';
el.waypoint(function(direction){
el.velocity(_animation, _duration);
if(direction == 'up'){
el.velocity(_animation, _duration);
}
}, {
offset: _offset,
triggerOnce: true
});
});
請讓我知道如果你有解決方案。 謝謝你的時間:)
非常感謝你,並感謝你的偉大的插件! – 2014-11-07 19:58:28