That's what 1.4.2 's API says:
Binds a function to be executed when the DOM is loaded ready to be queried and manipulated.
This is one of the most important functions in the event module, because it can greatly improve the response speed of Web applications.
Simply put, this method is purely an alternative to registering events with the Window.load event. By using this method, you can immediately call the function you are binding when DOM loading is ready to be read and manipulated, and 99.99% of JavaScript functions need to be executed at that moment.
There is a parameter-a reference to the jquery function-that is passed to the ready event handler function. You can give this parameter a name, and you can therefore safely use the $ alias without worrying about naming conflicts.
Make sure that there is no registration function in the OnLoad event for the <body> element, otherwise the $ (document) is not triggered. Ready () event.
The $ (document). Ready () event can be used indefinitely on the same page. The functions that are registered are executed sequentially in the order in which they are (in code).
Always thought that a page can only have one, did a lot of hard work, tragedy ah.