jquery when document is ready code example Example: document. ready $( document ).ready(function() { console.log( "ready!" ); });