Default can use this :
document.addEventListener('DOMContentLoaded', function () {
// do something here ...
}, false);
on fully load use this :
window.addEventListener('load', function () {
// do something here ...
}, false);
credit to source :
https://www.codeinwp.com/snippets/jquery-document-ready-in-vanilla-javascript/
Tidak ada komentar:
Posting Komentar