ALKMaps.Element

Summary
ALKMaps.Element
Functions
visible
toggleToggle the visibility of element(s) passed in
removeRemove the specified element from the DOM.
getHeight
hasClassTests if an element has the given CSS class name.
addClassAdd a CSS class name to an element.
removeClassRemove a CSS class name from an element.
toggleClassRemove a CSS class name from an element if it exists.
getStyle

Functions

visible

visible: function(element)

Parameters

element{DOMElement}

Returns

{Boolean} Is the element visible?

toggle

toggle: function()

Toggle the visibility of element(s) passed in

Parameters

element{DOMElement} Actually user can pass any number of elements

remove

remove: function(element)

Remove the specified element from the DOM.

Parameters

element{DOMElement}

getHeight

getHeight: function(element)

Parameters

element{DOMElement}

Returns

{Integer} The offset height of the element passed in

hasClass

hasClass: function(element,
name)

Tests if an element has the given CSS class name.

Parameters

element{DOMElement} A DOM element node.
name{String} The CSS class name to search for.

Returns

{Boolean} The element has the given class name.

addClass

addClass: function(element,
name)

Add a CSS class name to an element.  Safe where element already has the class name.

Parameters

element{DOMElement} A DOM element node.
name{String} The CSS class name to add.

Returns

{DOMElement} The element.

removeClass

removeClass: function(element,
name)

Remove a CSS class name from an element.  Safe where element does not have the class name.

Parameters

element{DOMElement} A DOM element node.
name{String} The CSS class name to remove.

Returns

{DOMElement} The element.

toggleClass

toggleClass: function(element,
name)

Remove a CSS class name from an element if it exists.  Add the class name if it doesn’t exist.

Parameters

element{DOMElement} A DOM element node.
name{String} The CSS class name to toggle.

Returns

{DOMElement} The element.

getStyle

getStyle: function(element,
style)

Parameters

element{DOMElement}
style{?}

Returns

{?}

visible: function(element)
toggle: function()
Toggle the visibility of element(s) passed in
remove: function(element)
Remove the specified element from the DOM.
getHeight: function(element)
hasClass: function(element,
name)
Tests if an element has the given CSS class name.
addClass: function(element,
name)
Add a CSS class name to an element.
removeClass: function(element,
name)
Remove a CSS class name from an element.
toggleClass: function(element,
name)
Remove a CSS class name from an element if it exists.
getStyle: function(element,
style)
Close