Answers for "document ready or load"

25

document ready

$( document ).ready(function() {
    console.log( "ready!" );
});
Posted by: Guest on March-24-2020
0

check if the document is ready js

let stateCheck = setInterval(() => {
  if (document.readyState === 'complete') {
    clearInterval(stateCheck);
    // document ready
  }
}, 100);
Posted by: Guest on August-19-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language