dracoblue.net

JsBehaviour 1.0 released

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 [email protected].

Demo + Spludo-Integration at "Editing the sections" on docsforit (double click on the content, this is all done by using JsBehaviour!!).

In javascript, jsb, mootools, open source, spludo by @ 07 Jul 2010

comments powered by Disqus

Recent Files

Advertisement

Recent Dev-Articles

Read recently

About

Blogroll