WireItLibrary

WireIt  0.6.0

WireItLibrary > WireIt > WireIt.WireIt
Search:
 
Filters

static Class WireIt.WireIt

Properties

defaultWireClass - object

TODO

util - object

WireIt.util contains utility classes

Methods

classFromXtype

void classFromXtype ( )
default

cn

static HTMLElement cn ( tag , [domAttributes] , [styleAttributes] , [innerHTML] )
Helper function to create a DOM node. (wrapps the document.createElement tag and the inputEx.sn functions)
Parameters:
tag <String> The tagName to create (ex: 'div', 'a', ...)
[domAttributes] <Object> see inputEx.sn
[styleAttributes] <Object> see inputEx.sn
[innerHTML] <String> The html string to append into the created element
Returns: HTMLElement
The created node

compact

static Array compact ( arr )
compact replace Array.compact for cases where it isn't available
Parameters:
arr <Array> Array to compact
Returns: Array
compacted array

getIntStyle

static Integer getIntStyle ( el , style )
Get a css property in pixels and convert it to an integer
Parameters:
el <HTMLElement> The element
style <String> css-property to get
Returns: Integer
integer size

indexOf

static Integer indexOf ( el , arr )
indexOf replace Array.indexOf for cases where it isn't available (IE6 only ?)
Parameters:
el <Any> element to search for
arr <Array> Array to search into
Returns: Integer
element index or -1 if not found

sn

static void sn ( el , ) , styleAttributes )
Helper function to set DOM node attributes and style attributes.
Parameters:
el <HTMLElement> The element to set attributes to
) <Object} domAttributes An object containing key/value pairs to set as node attributes (ex: {id: 'myElement', className: 'myCssClass', ...>
styleAttributes <Object> Same thing for style attributes. Please use camelCase for style attributes (ex: backgroundColor for 'background-color')


Copyright © 2010 Eric Abouaf All rights reserved.