Execute a callback when the DOM is ready.
If the document has already finished loading/parsing, the callback runs immediately (synchronously). Otherwise it waits for DOMContentLoaded.
Function to run once the DOM is ready
Execute a callback when the DOM is ready.
If the document has already finished loading/parsing, the callback runs immediately (synchronously). Otherwise it waits for DOMContentLoaded.