ismetertugral
11/20/2017 - 1:45 PM

Document Ready

Document Ready

// A $( document ).ready() block.
$( document ).ready(function() {
    console.log( "ready!" );
});
//////////////////////////////////////
// Shorthand for $( document ).ready()
$(function() {
    console.log( "ready!" );
});
//////////////////////////////////////
// Passing a named function instead of an anonymous function.
function readyFn( jQuery ) {
    // Code to run when the document is ready.
}
$( document ).ready( readyFn );
// or:
$( window ).on( "load", readyFn );