【发布时间】:2015-04-04 05:38:54
【问题描述】:
我正在使用 fullpage.js 插件,并且在事件 onLeave 中有一个函数,这里是 jquery 代码
onLeave: function(index, nextIndex, direction) {
$('#section-first').find('.a').each(function() { // i want run once then off / remove this function
if (index >= 2 && direction == 'up') {
$(this).removeClass('b');
}
});
它不是点击功能,我不知道如何在它运行一次后关闭/删除此功能,仍然使用开/关?但我把它放在哪里?非常感谢:)
【问题讨论】:
-
你在哪里定义了
onLeave。你能展示一下整个功能吗? -
对不起,我不知道如何显示:(,因为 onLeave 事件带有 fullpage.js 插件。
标签: jquery events fullpage.js