Mic*_*ele 7 html javascript jquery typeerror
我正在尝试使用iCheck插件,我是JQuery和javaScript的新手.我在浏览器中收到错误
TypeError:$未定义
我环顾四周找到了这个链接,但我尝试添加(jQuery),因为它建议,但它没有改变错误信息.
我看到的网页上的症状是网页没有悬停工作或复选框内的黑色,如极地皮肤显示示例.
有任何想法吗?请参阅下面的"c-style comment - //"以了解TypeError指向的确切行.
以下是我的代码的摘录:
<html>
<head>
<title>jQuery Michele Project</title>
<link href="css/skins/polaris/polaris.css" rel="stylesheet">
<link href="css/skins/all.css" rel="stylesheet">
<link href="css/demo/css/custom.css" rel="stylesheet">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="js/icheck.js"></script>
<script type="text/javascript" src="js/jquery-1.11.0.js"></script>
<script type="text/javascript" src="js/jquery.ui.core.js"></script>
<script type="text/javascript" src="js/jquery.ui.widget.js"></script>
<script type="text/javascript" src="js/jquery.ui.accordion.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#infolist").accordion({
autoHeight: false
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$('.input').iCheck({
checkboxClass:'icheckbox_polaris', //this is the line that the error message points to
radioClass:'iradio_polaris',
increaseArea:'-10%'
});
})(jQuery);
</script>
<style type="text/css">
ul {list-style-type: none}
img {padding-right: 20px; float:left}
#infolist {width:500px}
</style>
</head>
<body>
Run Code Online (Sandbox Code Playgroud)
Dom*_*Dom 10
您<script src="js/icheck.js"></script>在定义jQuery之前加载.首先加载jQuery.
<script type="text/javascript" src="js/jquery-1.11.0.js"></script>
<script type="text/javascript" src="js/jquery.ui.core.js"></script>
<script type="text/javascript" src="js/jquery.ui.widget.js"></script>
<script type="text/javascript" src="js/jquery.ui.accordion.js"></script>
<script src="js/icheck.js"></script>
Run Code Online (Sandbox Code Playgroud)