1// A jQuery( document ).ready() block.
2jQuery( document ).ready(function() {
3 console.log( "ready!" );
4});
1// Pass jQuery to a self executing function (closure) that maps it to the dollar sign so it can't be overwritten by another library in the scope of its execution
2(function( $ ){
3 $.fn.myPlugin = function() {
4 // Do your awesome plugin stuff here
5 };
6})( jQuery );