$(document).ready equivalent without jQuery

For Example, Here a script that uses $(document).ready, but it doesn't use anything else from jQuery...

Javascript

var docLoaded = setInterval(function () {
    if(document.readyState === "complete") {
    
    // Your code goes here i.e. init() 
    
    }
}, 100);
  • Share
  • Copyright 2016 by WebiBeris.com. All Rights Reserved.