models/Model

models/ModelCollection

views/View

parent

Holds a reference to the parent view. parent is null if the view hasn't been added.

element

Holds a reference to it's DOM node. This is the value passed to the constructor or a div if no element was passed.

children

childen is an array of all it's subviews.

animateInDelay

Represents the amount of milliseconds by which executeAnimateIn is called after a call to animateIn.

animateOutDelay

See: animateInDelay

initialize( [node : Object = jQuery] ) : View

The contsructor can be called with one argument which will be used as the DOM node for this view. If no argument is supplied a DIV will be created.

appendView( view : View ) : void

Appends the DOM node of the passed view and sets it's parent attribute. appending views allows for event bubbling and animateIn and animateOut calls to be called recursively through out the DOM tree.

prependView( view : View ) : void

Same as appendView but it adds the view as it's first child.

removeView( view : View )

Removes the view from it's children and removes it's node from the DOM

contains( view : View ) : Boolean

Checks if the supplied view is it's child.

parse( template : String, values : Object ) : String

parse can be used for simple templating that uses a simple replace-algorithm.

animateIn() : void

This method is used for recursive calls. It calls executeAnimateIn with the provided delay animateInDelay in milliseconds.

executeAnimateIn() : void

This method should be overridden to create animations. It will be called within the given delay.

animateOut() : void

Same as animateIn.

executeAnimateOut() : void

Same as executeAnimateIn.