Open wizardforcel opened 8 years ago
DOMContentLoaded has been added in HTML5. So:
DOMContentLoaded
jQuery:
$(() => { //... });
Modern:
// HTML5 document.addeventListener('DOMContentLoaded', () => { //... }); // HTML4 document.onreadystatechange = function() { if(document.readyState == 'complete') { //... } };
:+1:
I will definitely get around to adding this in soon. Thanks.
In fact, there is also a replacement in HTML 4. I've updated it.
DOMContentLoaded
has been added in HTML5. So:jQuery:
Modern: