I am looking for the most proper and efficient way to bind javascript events; particularly the onload event (I would like the event to occur after b
Something like that
window.onload = (function(onload) { return function(event) { onload && onload(event); $(".loading-overlay .spinner").fadeOut(300), $(".loading-overlay").fadeOut(300); $("body").css({ overflow: "auto", height: "auto", position: "relative" }) } }(window.onload));