1document.addEventListener("DOMContentLoaded", function(event) {
2 //we ready baby
3});
1<!doctype html>
2<html>
3<head>
4</head>
5<body>
6Your HTML here
7
8<script>
9// self executing function here
10(function() {
11 // your page initialization code here
12 // the DOM will be available here
13
14})();
15</script>
16</body>
17</html>
18
1document.addEventListener("DOMContentLoaded", function(event) {
2 //we ready baby
3});