$( document ).ready() | jQuery Learning Center

PHOTO EMBED

Sat May 29 2021 00:52:01 GMT+0000 (UTC)

Saved by @ejiwen

// 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 );
content_copyCOPY

You can also pass a named function to $( document ).ready() instead of passing an anonymous function.

https://learn.jquery.com/using-jquery-core/document-ready/