Check If the Document is Ready

Valento
Make your net worth less undefined.
Track your accounts, assets, and debts in one simple financial dashboard.
Explore Valento 

To check if the document is ready and execute some code, you bind an event listener to the DOMContentLoaded event of the document object:

document.addEventListener("DOMContentLoaded", handler);

It is somewhat equivalent to the following methods in jQuery:

$(document).ready(handler);
// or
$(handler);

Was this helpful?

Valento
Make your net worth less undefined.
Track your accounts, assets, and debts in one simple financial dashboard.
Explore Valento