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 js-behaviour@dracoblue.

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
@ 06 Jul 2010, Comments at Reddit & Hackernews

Give something back

Were my blog posts useful to you? If you want to give back, support one of these charities, too!

Report hate in social media Campact e.V. With our technology and your help, we protect the oceans from plastic waste. Gesellschaft fur Freiheitsrechte e. V. The civil eye in the mediterranean

Recent Dev-Articles

Read recently

Recent Files

About