绑定onLoad和onLeave事件不成功
来源:3-2 静态页思路验证-组件切换

番茄乌梅
2016-08-05
$(function(){ $('#h5').fullpage({ 'sectionsColor':['#254875','#00ff00','#254587','#695684'], onLeave:function (index,nextIndex,direction) { console.log(index) }, afterLoad:function (index,nextIndex,direction) { } }); $('.page').on('onLeave',function(){ console.log($(this).attr('id'),'===>','onleave') }); $('.page').on('afterLoad',function(){ console.log($(this).attr('id'),'===>','afterLoad') }) })
写回答
1回答
-
Lyn
2016-08-08
$('.page').trigger('onLoad') // <--注意事件名的大小写
00
相似问题