jQuery Dom ready equivalent in pure JavaScript
docReady(function() {
// DOM is loaded and ready for manipulation here
});
jQuery Dom ready equivalent in pure JavaScript
docReady(function() {
// DOM is loaded and ready for manipulation here
});
jQuery Dom ready equivalent in pure 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);
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us