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