gpt4 book ai didi

javascript - 阶段之间的 fullpage.js 初始化事件

转载 作者:搜寻专家 更新时间:2023-10-31 08:25:15 25 4
gpt4 key购买 nike

我有一个具有 fullpage.js 功能的页面,我想在各个阶段之间操作页面元素,例如> 在阶段之间滚动期间。

这是插件的基本结构,加上我想在舞台变化时与之互动的元素。现在我已经实现了我想要的,但是它消失了页面到达第四阶段部分,但我需要它消失之前 在第三个向下滚动时插件到达第四个部分。

<div id="element">
<p>The Element. *</p>
</div>
<div id="fullpage">
<div class="section">SECTION ONE *</div>
<div class="section">SECTION TWO **</div>
<div class="section">SECTION THREE ***</div>
<div class="section homeFour">SECTION FOUR ****</div>
</div>

我整理了一个样本 Fiddle here.

我怎样才能实现我想要实现的目标?


额外提示:

You can find the reverse logic that I have described in the second paragraph here.

最佳答案

你需要类似 onLeave 事件的东西吗? https://jsfiddle.net/x7bdwynx/1/

  onLeave: function(index, nextIndex, direction) {
if(index==3&&nextIndex==4&&direction=="down")
{
$('#element').addClass('hideCont');
}
if(index==4&&nextIndex==3&&direction=="up")
{
$('#element').removeClass('hideCont');
}
}

关于javascript - 阶段之间的 fullpage.js 初始化事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39389366/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com