$(document).ready()
function in Prototype so that I could add the handlers after the document loaded, but most of the guides I found were out of date (I'm running Prototype 1.6.0.3, and I don't know which version these guides were for, but they all made my Javascript console angry).Eventually, I was able to piece it together after digging through the depths of the Prototype API documentation. It's actually very simple:
document.observe('dom:loaded', function(){
// do yo thang...
});
Wrap whatever you're doing with that, and it won't be run until the document is loaded.
No comments:
Post a Comment