Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

fire off some javascript on page load

document.addEventListener("DOMContentLoaded", theDomHasLoaded, false);
window.addEventListener("load", pageFullyLoaded, false);

function theDomHasLoaded(e) {
    // do something
}

function pageFullyLoaded(e) {
    // do something again
}
Source by www.kirupa.com #
 
PREVIOUS NEXT
Tagged: #fire #javascript #page #load
ADD COMMENT
Topic
Name
6+7 =