PageLoad() and jQuery’s $(document).ready() events do the same and seem too similar but in different time. $(document).ready() and pageLoad() methods are very much differ in functioning. In this article, I will explain the major differences between $(document).ready() and pageLoad() methods.
- Introducing $(document).ready()
// Gets called as soon as DOM is ready
- Introducing window.onload (pageLoad() )
// gets called when page have been fully loaded