[jQuery] Deferring actions when DOM is ready

[jQuery] Deferring actions when DOM is ready

Hi folks,
an idea that struck me when reading the "Plugin method question" thread:
Is it possible to implement a mechanism that automatically defers all
jQuery "actions" to the DOM ready event?
This would be of great use in cases like the one described in the
mentioned thread. I think the need for the DOM ready handler is one of
the most difficult things to grasp when starting with jQuery without or
with bad JS background. That is, someone who hasn't worked with any DOM
manipulation, but knows CSS well, has no problems to understand
something like this: $('#id element.class').Accordion([options])
But to understand what this: $(document).ready(function() { ... }) or
this $(function() {}) is doing is much more difficult.
Due to performance issues I wouldn't want that auto-defer mechanism in
the core, but it would be a great help for starters.
After seeing John's debug plugin, I think it should be possible to
implement this. I'm just not sure if it is really of any use.
Your opinions?
--
Jörn Zaefferer
http://bassistance.de
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/