首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >进口和使用果冻插件包

进口和使用果冻插件包
EN

Stack Overflow用户
提问于 2019-08-22 07:09:45
回答 1查看 41关注 0票数 0

我正在使用包裹,偶然发现我使用了Jelly.js,并试图按指示导入

代码语言:javascript
复制
import $ from "jquery";
import 'jquery-scrollify';
import { Jelly } from 'jelly.js';

$(function(){
    var options = {
        paths: '#circle-path',     // Shape we want to draw
        pointsNumber: 25,            // Number of points
        maxDistance: 4,             // Max distance among points
        color: '#ff0019',
        opacity: 0.27,
        // centroid: '.centroid-text'   // Element to move accordingly with the centroid of the shape
        // debug: true               // Uncomment this to see the points
    };

    /* Initializing jelly */

    var jelly = new Jelly('.jelly-canvas', options);
});

但它让我犯了这个错误

未定义的ReferenceError:没有定义果冻

有什么想法吗?

EN

回答 1

Stack Overflow用户

发布于 2019-08-23 04:03:05

这是因为元素.jelly-canvas根本不存在,而且

代码语言:javascript
复制
import { Jelly } from 'jelly.js';

应该是

代码语言:javascript
复制
import Jelly from 'jelly.js';
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57603815

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档