Answers for "js when element is ready"

20

dom ready js

document.addEventListener("DOMContentLoaded", function() {
  // code
});
Posted by: Guest on April-02-2020
0

check if the document is ready js

if (document.readyState === 'complete') {
  // The page is fully loaded
}
Posted by: Guest on August-19-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language