I've been using this code for quite some time, but am wondering if there's any improvements I can make to it. Basically it's just code that runs when the page loads or if the code is run after page load, it will run right away. Do you see any cross browser compatibility issues or any more efficient ways of writing this? ol()
is a predefined function to be run.
(document.readyState=='complete') ?
ol():(window.addEventListener&&window.addEventListener("load",ol,false)||
window.attachEvent&&window.attachEvent("onload",ol));
.ready()
– Joseph the Dreamer Feb 26 at 8:28.ready
coverage starts around 21:20. There's also some links to jQuery sources. – Michael Paulukonis Feb 26 at 15:47