This is a tiny library I have been using to create inline dynamic effects at docsforit without inline javascript. Since it is not spludo (serverside javascript mvc framework) specific and works as long as mootools is available, I release it for the public today.
How does it work?
The idea behind JsBehaviour is pretty simple. Put a class ( jsb) on all elements which should be enriched/enhanced by javascript. Additionally put a class [em]jsb keyword[/em] on the element to define which behaviour should be applied to the element.
Each behaviour can register on such keyword by using this
JsBehaviourToolkit.registerHandler('keyword', KeywordBehaviour);
method. As soon as the dom is loaded
JsBehaviourToolkit.applyBehaviour(window.document);
is executed. You might even overwrite your Request.HTML method to do the same.
Hope you enjoy to work and tweak this little piece of MIT-licensed software.
Download @ DracoBlue.net and js-behaviour@dracoblue.
Demo + Spludo-Integration at "Editing the sections" on docsforit (double click on the content, this is all done by using JsBehaviour!!).