Logo
doctype [?]
[strict] [loose] [none]

Util, DOM, CSS, Event Functions


Note: Expanded documentation will be available soon

The Util package consists of several global functions and a number of classes with static methods.

Global Functions

isArray (object) : boolean

isObject (object) : boolean

defined (val) : boolean

map (function, object*) : Array

setDefaultValues (objectToChange, objectDefaultValues) : Object

DOM Methods

DOM.getParentByTagName (HTMLElement, stringTagName) : HTMLElement

DOM.removeNode (HTMLElement) : boolean

DOM.getOuterWidth (HTMLElement) : int

DOM.getOuterHeight (HTMLElement) : int

DOM.resolve (*) : *

CSS Methods

CSS.rgb2hex (stringRGB) : string

CSS.hyphen2camel (stringProperty) : string

CSS.hasClass ([string|HTMLElement], stringClassName) : boolean

CSS.addClass (HTMLElement, stringClassName) : boolean

CSS.removeClass (HTMLElement, stringClassName) : boolean

CSS.replaceClass (HTMLElement, stringOldClassName, stringNewClassName) : boolean

CSS.getStyle (HTMLElement, property-name) : string ( alias: CSS.get() )

CSS.setStyle (HTMLElement, property-name, value) : boolean ( alias: CSS.set() )

CSS.createId ([HTMLElement]) : string

Event Methods

Event.resolve (EventObject) : EventObject

Event.add (HTMLElement, stringEventType, function, booleanCapture) : boolean

Event.getMouseX (EventObject) : int

Event.getMouseY (EventObject) : int

Event.cancelBubble (EventObject) ( alias: Event.stopPropagation() )

Screen Methods

Screen.getBody() : HTMLBodyElement

Screen.getScrollTop() : int

Screen.getScrollLeft() : int

Screen.getDocumentWidth() : int

Screen.getDocumentHeight() : int

Screen.getViewportWidth() : int

Screen.getViewportHeight() : int

Sort Methods

Sort.AlphaNumeric

Sort.Numeric

Sort.IgnoreCase

Sort.Currency

Sort.Date