on ready function code example
Example: jquery doc ready
// A jQuery( document ).ready() block.
jQuery( document ).ready(function() {
console.log( "ready!" );
});
// A jQuery( document ).ready() block.
jQuery( document ).ready(function() {
console.log( "ready!" );
});