JavaScript » Run code when document is loaded
Alternative to jQuery’s $()
callback:
document.addEventListener('DOMContentLoaded', function () {
// ...
})
Alternative to jQuery’s $()
callback:
document.addEventListener('DOMContentLoaded', function () {
// ...
})