$ (documento) .ready, window.onload

document.addEventListener("DOMContentLoaded", function(event) { 
  //do work
});

// or
window.onload = function() {

};
minh chiu