home / software / tips and tricks / Chapter 3- Document Ready Function

Chapter 3- Document Ready Function

Updated:  06/15/2013 00:06 AM
Author:  Shiju Mathews

Status:    Resolved.


Chapter 3- Document Ready Function
<<   Previous ChapterChaper 3Next Chapter >>
 

All jQuery methods are placed inside a document ready event. This is to prevent any jQuery code from running before the document is finished loading.
It is good practice to wait for the document to be fully loaded and ready before working with it. This also allows you to have your JavaScript code before the body of your document, in the head section.
When we try to access elements before it loaded, it can create an error.

Syntax:

Chapter 3- Document Ready Function
<<   Previous ChapterChaper 3Next Chapter >>
 

Tags: Chapter 3- Document Ready Function
Updated on: March 2024