One of the most common mistakes when using jQuery is that we forget to load the jQuery library before the jQuery script (whatever script you are working on). How do our jQuery scripts work if we don’t load the fundamentals right?
Your jQuery scripts will not work unless you load the jQuery library BEFORE the jQuery script.. so it should look something like this.
H T M L
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <!-- jQuery library --> <script type="text/javascript" src="http://requestmike.com/myscript.js"></script> <!-- your custom script -->
The reason why I’m posting this is because there has been numerous times where I would accidentally put myscript.js before jquery.min.js and nothing would work. I would then spend countless minutes figuring out why myscript.js is not working when everything seems proper -to my surprise- it’s something simple as putting jquery.min.js before myscript.js.
So I hope this will save people sometime when their scripts stops working.