Javascript jquery document ready etc. explain?

(function($) { //code0
‘use strict’;

$(window).load(function() {


(function($, window, document, undefined) {
‘use strict’;
})(jQuery, window, document);

Code 0 is same as document ready right? Code1 is with load document ready. Code 2 load content after frames images loaded. Code 3? when is good to use it?

What ypes of codes need to run in document ready? like slider plugins ok
in window load function something about cookie display plugin is fine bit with that code3 ?


Thanks for help!!! A good explain is will be good :stuck_out_tongue: