gpt4 book ai didi

javascript - 未捕获类型错误 :undefined is not a function while using slide left infullpage. js

转载 作者:行者123 更新时间:2023-12-03 11:44:32 26 4
gpt4 key购买 nike

我在我的网站中使用 fullpage.js。我希望水平幻灯片自动滑动。为此,我正在使用以下代码。但我在控制台中收到错误:

Uncaught typeError:undefined is not a function.

代码:

<script type="text/javascript">
$(document).ready(function() {
$('#fullpage').fullpage({
anchors: ['home', 'about', 'why-us','services','team','contact'],
autoScrolling: true,
css3: true,
afterRender: function () {
setInterval(function () {
$.fn.fullpage.moveSlideRight();
}, 3000);
}
});
});
</script>

最佳答案

您没有正确包含所需的文件。确保它们位于您指定的位置。

正如文档中所指出的以及您在 the examples provided 中看到的那样,这是您添加所需文件时必须遵循的结构。

<link rel="stylesheet" type="text/css" href="jquery.fullPage.css" />

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

<!-- This following line is needed in case of using the default easing option or when using another
one rather than "linear" or "swing". You can also add the full jQuery UI instead of this file if you prefer -->
<script src="vendors/jquery.easings.min.js"></script>


<!-- This following line needed in the case of using the plugin option `scrollOverflow:true` -->
<script type="text/javascript" src="vendors/jquery.slimscroll.min.js"></script>

<script type="text/javascript" src="jquery.fullPage.js"></script>

关于javascript - 未捕获类型错误 :undefined is not a function while using slide left infullpage. js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26113263/

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