在Sage 9中导入FullPage.js

我正在尝试以我的Sage主题导入Fullpage.js。 我用以下方法安装了FullPageScroll:

npm install fullpage.js

添加了以下代码:scripts / main.js:

// import external dependencies
import 'jquery';
import 'fullpage.js/vendors/scrolloverflow.js';
import 'fullpage.js/dist/fullpage.js';

和:scripts / routes / home.js:

    // Initializing it
$('#fullpage').fullpage({
  //options here
  autoScrolling: true,//Navigation
  navigation: true,navigationPosition: 'left',});

//methods
$.fn.fullpage.setallowScrolling(true);

但是仍然出现此错误(我遵循了Sage书第6.6章中记录的说明):

  

未捕获的TypeError:整页不是构造函数

希望有人可以帮助我朝正确的方向前进。

谢谢!

shiqing22 回答:在Sage 9中导入FullPage.js

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3151325.html

大家都在问