0
我有一个代码的问题。我想在我的web项目中导入这个库。我收到此错误:
TypeError: $(...).circliful is not a function circle.js:2:2
我正确导入的所有文件:
<script type="text/javascript" src="/wp-content/themes/storefront/jquery.circliful.min.js"></script>
<script type="text/javascript" src="/wp-content/themes/storefront/circle.js"></script>
其次我做了我:
<div id="test-circle3"></div>
这是circle.js:
jQuery(document).ready(function() {
$("#test-circle3").circliful({
animation: 1,
animationStep: 6,
foregroundBorderWidth: 5,
backgroundBorderWidth: 1,
percent: 88,
iconColor: '#3498DB',
icon: 'f004',
iconSize: '40',
iconPosition: 'middle'
});
});
主管部门:
<head>
<script src="/wp-content/themes/storefront/jquery-3.1.1.min.js"></script>
<meta charset="<?php bloginfo('charset'); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<link rel="profile" href="https://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
<?php wp_head(); ?>
<script type="text/javascript" src="/wp-content/themes/storefront/scrolling_nav.js"></script>
<script type="text/javascript" src="/wp-content/themes/storefront/styleswitcher.js"></script>
<script type="text/javascript" src="/wp-content/themes/storefront/js.cookie.js"></script>
</head>
难道这包括jQuery的后? – vlaz
是的,它是后jQuery的嵌入 – ItsOdi
是的,首先包括jquery,总是,然后包括插件 – GiuServ