1<script src='jquery.js'></script>
2if (typeof $ == 'undefined') {
3 var $ = jQuery;
4}
5
1 <script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha384-3ceskX3iaEnIogmQchP8opvBy3Mi7Ce34nWjpBIwVTHfGYWQS9jwHDVRnpKKHJg7" crossorigin="anonymous"></script>
2
1(function( $ ) {
2 "use strict";
3
4 $(function() {
5
6 //Your code here
7
8 });
9
10}(jQuery));
11
1/Uncaught TypeError: $ is not a function
2
3// Usually this is because Jquery doenst know what $ is
4// because it isn't described
5
6jQuery(document).ready(function() {
7
8 // In the brackets you write your Code
9 // for each new function you start with
10
11 jQuery(window).scroll(function(){
12 // etc..
13 )};
14
15};
16// If you are testing on a localhost dont forget to embed the latest jQuery
17