DOM - Ready event (Readiness|readyState)


A page in a ready state, all images are not finished downloading, including banner ads.


The readyNess can be read in the readyState property of the document


The document.readyState property returns:

  • loading while the Document is loading, (ie if the document is associated with an HTML parser, an XML parser, or an XSLT processor)
  • interactive once it is finished parsing but still loading sub-resources,
  • and complete once it has loaded.

The readystatechange event fires on the Document object when this value changes.

Timeline Event Reference

Run code at event

Native Javascript

Same as Browser - DOMContentLoaded event (page load) ?

window.addEventListener('DOMContentLoaded', function () {
  console.log("It's ready!")


To run code as soon as the document is ready to be manipulated in Javascript - JQuery with the Ready event

$( document ).ready(function() {
    // Your code here.

Powered by ComboStrap