Skip to content

$.ready()

Arthur Guiot edited this page Jul 16, 2017 · 1 revision

How it works?

This function will basically run a function when the page document is fully loaded. This will simply add the ability to run functions when everything works fine.

How to use it?

This function will only require 1 argument which is a callback function that will be called when the DOM is ready.

Example

Let's display an alert when the DOM is fully loaded:

JS:

$.ready(function () {
    alert("🚨 The DOM is now ready!");
})

⚠️ Questions?

Don't hesitate to ask your questions ⁉️ in the issue part 😁

Clone this wiki locally