JQuery TypeError: $ is undefined

I am trying to use the iCheck plugin and I am new to jQuery and javaScript. I get an error in the browser that says

TypeError: $ is undefined

I looked around and found the link, but I tried to add (jQuery) as it suggests, but that did not change the error message.

The symptom on the webpage that I see is that the webpage does not hang or is black inside the check box, for example example to show skin skin.

Any ideas? See "C-style comment - //" below for the exact line pointed to by TypeError.

Here is an excerpt from my code:

<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> 
+6
source share
1 answer

<script src="js/icheck.js"></script> before the jQuery definition. Download jQuery first.

 <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> 
+10
source

All Articles