Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js on page ready

document.addEventListener("DOMContentLoaded", function(event){
  // your code here
});

Better than 

window.onload = function(){
    // code goes here
};
 
PREVIOUS NEXT
Tagged: #js #page #ready
ADD COMMENT
Topic
Name
6+3 =