Utilities for elements
An event wrapper to get better and easier information about the passed event.
// generic event wrappervar event =// for mouse eventsvar mouse =// for keyboard eventsvar key =var $ =// a way to define new/custom keyCode / keyname pairskey
Behavior is a way to initiate certain UI components for elements on the page by a given selector. The callback is only called once of each element.
var Behavior =var ready =// create a new behaviorvar behavior =// define a new slider behavior, which initiates a slider class.behavior// behavior for external linksbehavior// once each behavior is defined, we call .update to initiate them all.// usually this happens in a domready() call
For determining the size and position of an element.
var $ =var pos =// this returns an object with the following properties:// x, left, y, top, right, bottom, width and height.console // 314
Empty all the content of an element
var $ =// element is empty, doesn't have any childNodes anymore.