The $(document).ready() function is use to execute the code when the DOM is fully loaded. We can say that $(document).ready() is an event which is fire when DOM is fully loaded or ready to use.
Document
Ready function:-
We
can call more than one document.ready()
function in single page.
The document.ready() function is called when DOM is not fully loaded that means rest of
images, css or other 3rd party reference on page.
It
will not wait for the images, css or other 3rd party to get loaded.
The ready
and load events:
1.
$(document).on('ready', handler)
2.
$(document).on('load', handler)
I Hope it is helpful to you! Thank you!