move is not defiened
下面是我的引入:
<link href="https://cdn.bootcss.com/fullPage.js/2.9.7/jquery.fullpage.min.css" rel="stylesheet"> <link rel="stylesheet" href="./css/index.css"> <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script> <script src="https://cdn.bootcss.com/fullPage.js/2.9.7/jquery.fullpage.min.js"></script> <script src="./js/move.js"></script> <script src="./js/index.js"></script>
然后js代码:
afterLoad: function(link, index) { if (index === 2) { move('.section2').set('margin-left', '400px').end() } },
这里会报错
Uncaught ReferenceError: move is not defined
at jQuery.fn.init.afterLoad (index.js:8)
at ro (jquery.fullpage.js:1579)
at jquery.fullpage.js:1464
afterLoad @ index.js:8
ro @ jquery.fullpage.js:1579
(anonymous) @ jquery.fullpage.js:1464
setTimeout (async)
(anonymous) @ jquery.fullpage.js:1463
so @ jquery.fullpage.js:1438
Ye @ jquery.fullpage.js:394
Ze @ jquery.fullpage.js:1079
io @ jquery.fullpage.js:1252
不知道是什么原因。