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