what does $(document).ready(function() do code example
Example: (function (g, d, a) {})(window, document, jQuery);
;( // <---------------+
// | encapsulate the function
function($, window, document) { // <--+ declare | and call it passing three
// | anonymous | arguments.
} // <--+ function |
// |
)(jQuery, window, document); // <---------------+