when we use document.ready function code example Example: document ready jquery $(function() { // Handler for .ready() called. });