0
Q:

shorthand for jquery document ready

// A $( document ).ready() block.
$( document ).ready(function() {
    console.log( "ready!" );
});
1
$( document ).ready(function() {
    console.log( "ready!" );
});
2
$(function(){ 
	//jQuery code here 
});
1
jQuery(function() {
    // Code here
});
0
// 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
(function( $ ){
  $.fn.myPlugin = function() {
    // Do your awesome plugin stuff here
  };
})( jQuery );
0

New to Communities?

Join the community