In my application i am using
$(document).ready()
What is the difference between this and
$(document).onload()
The ready
is triggered when only the DOM becomes ready while onload
triggers when all resources of the page including DOM, images, frames, etc have loaded.
See:
$(document).ready vs. $(window).load
Note that ready
lies with jQuery not raw javascript so I assume you know that and that way comparison seems logical.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With