By Forrest Smith - Drempd.com
To wait until the document is ready, similiar to the $(document).ready functionality in jQuery, just do this:
document.addEventListener( 'DOMContentLoaded', function(e) {
Stuff Here
})
To wait until the document is ready, similiar to the $(document).ready functionality in jQuery, just do this:
document.addEventListener( 'DOMContentLoaded', function(e) {
Stuff Here
})