---
title: "JavaScript document.ready() – Document Ready JS and jQuery Example"
url: https://daily.dev/posts/javascript-document-ready-document-ready-js-and-jquery-example-qwcdk4x-x
source_url: https://www.freecodecamp.org/news/javascript-document-ready-jquery-example/
type: article
source: "freeCodeCamp"
author: "Abba Vincent Ihechikara"
published: 2022-07-27T22:44:22.830Z
updated: 2022-07-27T22:44:22.762Z
tags: ["javascript", "dom", "jquery"]
reading_time: 2
upvotes: 21
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# JavaScript document.ready() – Document Ready JS and jQuery Example

**[freeCodeCamp](https://daily.dev/sources/freecodecamp)** · [@chikara](https://daily.dev/chikara) · 2 min read · 21 upvotes · 0 comments

## Summary

The $(document).ready() method only waits for the DOM to load, it doesn't wait for stylesheets, images, and iframes. The DOMContentLoaded event fires once the DOM has loaded, so you'll only see "Hello World!" in the console after the method has started running.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.freecodecamp.org/news/javascript-document-ready-jquery-example/>

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#dom](https://daily.dev/tags/dom), [#jquery](https://daily.dev/tags/jquery)

[View this post on daily.dev](https://daily.dev/posts/javascript-document-ready-document-ready-js-and-jquery-example-qwcdk4x-x)
