How to run a code on document ready event in jQuery ?
In this article, we will see how to run a code when a page loads using jQuery. To run a code at page load time, we will use the ready() method. This method helps to load the whole page and then execute the rest code. This method specifies the function to execute when the DOM is fully loaded.
Parameters: This method accepts a single parameter function which is mandatory. It is used to specify the function to run after the document is loaded.
Return Value: This method returns the document after performing the ready() method.
Example: In this example, we will use the ready() method.
My Personal Notes arrow_drop_up
Please Login to comment...