// Personal website of Chris Smith

JavaScript » Run code when document is loaded

Alternative to jQuery’s $() callback:

document.addEventListener('DOMContentLoaded', function () {
    // ...
})