I’ve had some recent inspiration for the mooWalkthrough again. I’ve been thinking that it would really help people to have real updated content for mootools 1.2 and for 1.2.1 being out, I’m pretty late on the walkthrough front.
My ideas have focus on how I’ve worded various pages of the walkthrough. For instance, on the domready page, there is so much text,
There are down sides to that method. First of all, you have to wait for all images. Next, what if you had a few scripts that had some code tied to window.onload? They would overwrite each other. There are other solutions, which copy the old function from window.onload and add it plus the scripts function back, yet that isn’t exactly elegant.
As mentioned, MooTools comes with a custom event that fires as soon as the DOM is ready. It is called DomReady.
I’m pretty sure I can summarize that chuck of text in much less text. For instance, the above chunk becomes,
Don’t wait for external content using window.onload but rather interact with the page as soon as the DOM is ready to go. Use DomReady.
Isn’t that better? It’s certainly much more direct. I understand that some things are omitted from the chunk’s summery but more or less this type of compression will help everyone.
This concise form will enable me to write the walkthrough faster but also allow, I hope, some people gain more understanding of mootools.
