Answers for "java script docuemnt ready"

0

document ready

// A $( document ).ready() block.
$( document ).ready(function() {
    console.log( "ready!" );
});
Posted by: Guest on November-23-2021
0

document.ready javascript

function docReady(fn) {
    // see if DOM is already available
    if (document.readyState === "complete" || document.readyState === "interactive") {
        // call on next available tick
        setTimeout(fn, 1);
    } else {
        document.addEventListener("DOMContentLoaded", fn);
    }
}
Posted by: Guest on February-18-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language