This file requires two javascript files to work properly. They are behavior.js and css-Query-p.js and can be found in the js/behaviors folder. The script allows you to apply behaviors to a css class, so you don't pollute your html with a ton of inline javascript. The example below uses the following script tag to apply the behaviors. you can also link external javascript files to apply behaviors as well.
Behavior.register( ".alert", function(element) { element.onclick = function(){ alert('I alert on click'); } } ); Behavior.register( ".annoy", function(element) { element.onmouseout = function(){ alert('I alert on mouseout, very annoying'); } } ); Behavior.register( ".red", function(element) { element.onmouseover = function(){ element.style.backgroundColor = 'red'; } } );