My Library Reference

$

The global $ variable is an alias for getEBCS.

API

The global API variable is an object that encapsulates all library functions.

absoluteElement

The absoluteElement function positions an element absolutely, preserving its position and size.

Syntax

absoluteElement(el);

addBookmark

The addBookmark function calls on the browser to display its bookmarking (AKA favorites) dialog with the supplied location and title.

Syntax

addBookmark(href, title[, win]);

addBookmarkCurrent

The addBookmarkCurrent function calls on the browser to display its bookmarking (AKA favorites) dialog with the current location and title.

Syntax

addBookmarkCurrent([win]);

addClass

See Also

The addClass function adds a CSS class to an element.

Syntax

addClass(el, className);

addElementHtml

See Also

The addElementHtml function adds HTML to an element, preserving listeners attached to the existing nodes.

Syntax

addElementHtml(el, html);

addElementScript

See Also

The addElementScript function adds script to a script element.

Syntax

addElementScript(el, script);

addElementNodes

See Also

The addElementNodes function adds nodes to an element.

Syntax

addElementNodes(el, elNewNodes);

addElementText

See Also

The addElementText function adds text to an element.

Syntax

addElementText(el, text);

addOption

See Also

The addOption function adds an option to a select element.

Syntax

addOption(el, text[, value]);

Return Value

The function returns the new option.

addOptions

See Also

The addOptions function adds one or more options to a select element.

Syntax

opt = addOption(el, options);

addScript

The addScript function adds script to a document.

Syntax

addScript(text[, docNode]);

addStyleRule

See Also

The addStyleRule function adds a CSS rule to a document. It is typically used to hide content during the page load, after which the content is enhanced and/or made visible, depending on the available features of the environment.

Note that the canAdjustStyle function should be consulted before hiding content in this way.

Syntax

addStyleRule(selector, rule[, media[, docNode]]);

adjacentElement

See Also

The adjacentElement function positions an element adjacent to another.

Syntax

adjacentElement(el, elAdjacent[, side]);

applyDirectXTransitionFilter

attachContextClickListener

See Also

The attachContextClickListener function adds a listener to an element for two events (contextmenu and mouseup), calling the specified function once per click of the context button.

Syntax

attachContextClickListener(el, fn[, context]);

attachDocumentListener

See Also

The attachDocumentListener function adds an event listener to a document.

Syntax

attachDocumentListener(ev, fn[, context[, docNode]]);

attachDocumentReadyListener

See Also

The attachDocumentReadyListener function adds a DOMContentLoaded listener to a document and a load listener to the document's window, calling the specified function once when the document is ready for programmatic manipulation. The load event is used as a fallback for browsers that do not support the DOMContentLoaded event (e.g. Internet Explorer, Safari.) As the load event is not fired until all document assets (e.g. images, Flash movies) are fully loaded, it is usually preferable to call the documentReady function from a script at the end of the body element. The Document Ready add-on serves this purpose.

Note that some features of the library are not available until the document is ready (e.g. DirectX.) Code that utilizes these features should be wrapped in a function that is passed to attachDocumentReadyListener.

Syntax

attachDocumentReadyListener(fn[, docNode]);

attachHelpListener

See Also

The attachHelpListener function adds a listener to an element for two events (help and keydown), calling the specified function once per press of the help key.

Syntax

attachHelpListener(el, fn[, context]);

attachListener

See Also

The attachListener function adds an event listener to an element.

Syntax

attachListener(el, ev, fn[, context]);

attachMousewheelListener

See Also

The attachMousewheelListener function adds a listener for two events (mousewheel and dommousescroll), calling the specified function once per mousewheel movement. In addition to passing the standard event parameter, a second argument indicates the direction and distance of the movement.

Syntax

attachMousewheelListener(el, fn[, context]);

attachRolloverListeners

See Also

The attachRolloverListeners function adds listeners to an element for two events (mouseover and mouseout), calling each of the two passed functions as appropriate. Optionally, it adds the listeners for the focus and blur events. Another option allows for the automatic display of the element's title in the status bar (requires Status Bar module.)

Syntax

attachRolloverListeners(el, fnOver, fnOut[, context[, bAddFocusListeners[, bSetStatus]]]);

attachWindowListener

See Also

The attachWindowListener function adds an event listener to a window.

Syntax

attachWindowListener(ev, fn[, context[, win]]);

canAdjustStyle

See Also

The canAdjustStyle function tests if the specified style (display, position or visibility) can be changed programmatically.

Syntax

b = canAdjustStyle(style);

Return Value

The function returns a boolean.

cancelDefault

See Also

The cancelDefault function prevents the default action of an event.

Syntax

cancelDefault(e);

cancelPropagation

See Also

The cancelPropagation function prevents the bubbling of an event.

Syntax

cancelPropagation(e);

centerElement

changeImage

See Also

The changeImage function changes the source of an image. The source may be specified by an image location or the handle of a preloaded image. The optional parameters are for use with effects modules (e.g. DirectX), which replace the standard function with one that supports progressively rendered changeovers.

Syntax

changeImage(el, src[, options[, callback]]);

clonePreloadedImage

See Also

The clonePreloadedImage function creates an image element from a preloaded image.

Syntax

el = clonePreloadedImage(handle);

Return Value

The function returns an image element.

cookiesEnabled

See Also

The cookiesEnabled function tests if cookies are enabled.

Syntax

b = cookiesEnabled();

Return Value

The function returns a boolean.

createElement

See Also

The createElement function creates an (X)HTML element.

Syntax

el = createElement(tag[, docNode]);

Return Value

The function returns an element.

createElementWithAttributes

See Also

The createElementWithAttributes function creates an (X)HTML element and sets one or more attributes.

Syntax

el = createElement(tag, attributes[, docNode]);

Return Value

The function returns an element.

createFlash

createXmlHttpRequest

The createXmlHttpRequest creates an XHR object.

Syntax

xhr = createXmlHttpRequest();

Return Value

The function returns an XHR object.

deleteCookie

See Also

The deleteCookie function deletes a cookie.

Syntax

deleteCookie(name[, path[, docNode]]);

deleteCookieCrumb

See Also

The deleteCookieCrumb function deletes a portion of a cookie.

Syntax

deleteCookieCrumb(name, crumb[, docNode]);

detachListener

See Also

The detachListener function removes an event listener from an element.

Syntax

detachListener(el, ev, fn);

detachDocumentListener

See Also

The detachDocumentListener function removes an event listener from a document.

Syntax

detachDocumentListener(el, ev, fn[, docNode]);

detachWindowListener

See Also

The detachWindowListener function removes an event listener from a window.

Syntax

detachWindowListener(el, ev, fn[, win]);

dispatchEvent

The dispatchEvent function fires an event for an element, resulting in the execution of listeners attached to the specified event.

Syntax

dispatchEvent(el, ev[, evType]);

documentReady

See Also

The documentReady function tests if the document is ready.

Syntax

b = documentReady();

Return Value

The function returns a boolean.

documentReadyListener

See Also

The documentReadyListener function is called internally when the document is ready. It is exposed as a method so it can be called by script at the end of the body element, such as the Document Ready add-on.

Syntax

documentReadyListener();

effects

ease

elementContainedInElement

See Also

elementOverlapsElement

See Also

every

See Also

The every function calls the specified function for each element of the specified array, returning true if every result is true.

Syntax

b = every(a, fn[, context]);

Return Value

The function returns a boolean.

filter

See Also

The filter function calls the specified function for each element of the specified array, returning a new array of only the elements for which the result was true.

Syntax

a = filter(a, fn[, context]);

Return Value

The function returns a new array.

FlashVariables

forEach

See Also

The forEach function calls the specified function for each element of the specified array.

Syntax

forEach(a, fn[, context]);

forEachProperty

See Also

The forEachProperty function calls the specified function for each enumerable property of the specified object.

Note that properties inherited from the object's prototype are excluded.

Syntax

forEachProperty(o, fn[, context]);

fullScreenElement

getAnchor

See Also

The getAnchor function finds an anchor element by name or index.

Syntax

el = getAnchor(i[, docNode]);

Return Value

The function returns an anchor element or null if none is found to match the specified name or index.

getAnchors

See Also

The getAnchors function finds all anchor elements in a document.

Syntax

a = getAnchors([docNode]);

Return Value

The function returns an array or array-like object.

getAnElement

See Also

The getAnElement function retrieves the first element in a document (typically the html element.)

Syntax

el = getAnElement([docNode]);

Return Value

The function returns an element or null if none is found.

getAttribute

See Also

The getAttribute function retrieves the value of the specified attribute of the specified element.

Syntax

v = getAttribute(el, name);

Return Value

The function returns a string or null if the specified attribute does not exist.

getBodyElement

See Also

The getBodyElement function retrieves the body element of a document.

Syntax

el = getBodyElement([docNode]);

Return Value

The function returns a body element or null if none is found.

getChildren

The getChildren function retrieves all child elements of an element or document.

Syntax

a = getChildren(node);

Return Value

The function returns an array or array-like object.

getComputedStyle

getCookie

See Also

The getCookie function retrieves the cookie with the specified name.

Syntax

c = getCookie(name[, defaultValue[, encoded[, docNode]]]);

Return Value

The function returns a string or null if a cookie with the specified name does not exist.

getCookieCrumb

See Also

The getCookieCrumb function retrieves a portion of a cookie.

Syntax

s = getCookieCrumb(name, crumb[, defaultValue[, docNode]]);

Return Value

The function returns a string or null if a cookie with the specified name does not exist.

getDocumentWindow

The getDocumentWindow function retrieves the containing window of a document.

Syntax

win = getDocumentWindow([docNode]);

Return Value

The function returns a window.

getEBI

The getEBI function retrieves an element with the specified ID.

Syntax

el = getEBI(id[, docNode]);

Return Value

The function returns an element with the specified ID or null if not found.

getElementBorder

getElementBorders

getEBCN

The getEBCN function retrieves elements with the specified class name from an element or document.

Syntax

el = getEBCN(className[, node]);

Return Value

The function returns an array.

getEBCS

The getEBCS function retrieves elements that match the specified CSS selector from an element or document.

Syntax

el = getEBCS(selector[, node]);

Return Value

The function returns an array.

getEBTN

The getEBTN function retrieves elements with the specified tag name from an element or document.

Syntax

el = getEBTN(tag[, node]);

Return Value

The function returns an array or array-like object.

getEBXP

The getEBXP function retrieves elements that match the specified XPath expression from an element or document.

Syntax

el = getEBXP(path[, node]);

Return Value

The function returns an array.

getElementDocument

The getElementDocument function retrieves the containing document of an element.

Syntax

el = getElementDocument(el);

Return Value

The function returns a document or null if the element is part of a fragment.

getElementMargin

getElementMargins

getElementParentElement

The getElementParentElement function retrieves the parent element of an element.

Syntax

el = getElementParentElement(el);

Return Value

The function returns an element or null if the element is has no parent element (e.g. is the child of a document.)

getElementText

See Also

The getElementText function retrieves the text of an element.

Syntax

s = getElementText(el);

Return Value

The function returns a string.

getEnabledPlugin

The getEnabledPlugin function retrieves the description of an enabled plugin that matches the specified MIME type or title.

Syntax

s = getEnabledPlugin(mimeType[, title]);

Return Value

The function returns a string or null if an enabled plugin is not found.

getEventTarget

The getEventTarget function retrieves the target element of an event.

Syntax

el = getEventTarget(e);

Return Value

The function returns an element.

getEventTargetRelated

The getEventTarget function retrieves the related target element of an event.

Syntax

el = getEventTargetRelated(e);

Return Value

The function returns an element or null if there is no related target.

getForm

See Also

The getForm function finds a form element by name or index.

Syntax

el = getForm(i[, docNode]);

Return Value

The function returns a form element or null if none is found to match the specified name or index.

getFlashVersion

getForms

See Also

The getForms function finds all form elements in a document.

Syntax

a = getForms([docNode]);

Return Value

The function returns an array or array-like object.

getHeadElement

See Also

The getBodyElement function retrieves the head element of a document.

Syntax

el = getHeadElement([docNode]);

Return Value

The function returns a head element or null if none is found.

getHtmlElement

See Also

The getHtmlElement function retrieves the html element of a document.

Syntax

el = getHtmlElement([docNode]);

Return Value

The function returns an html element or null if none is found.

getImage

See Also

The getImage function finds an image element by name or index.

Syntax

el = getImage(i[, docNode]);

Return Value

The function returns an image element or null if none is found to match the specified name or index.

getImages

See Also

The getImages function finds all image elements in a document.

Syntax

a = getImages([docNode]);

Return Value

The function returns an array or array-like object.

getKeyboardKey

The getKeyboardKey function retrieves the code of the keyboard key related to an event.

Syntax

n = getKeyboardKey(e);

Return Value

The function returns a number.

getLink

See Also

The getLink function finds a link by name or index.

Syntax

el = getLink(i[, docNode]);

Return Value

The function returns an anchor element or null if none is found to match the specified name or index.

getLinks

See Also

The getLinks function finds all links in a document.

Syntax

a = getLinks([docNode]);

Return Value

The function returns an array or array-like object.

getMouseButtons

The getMouseButtons function retrieves the state of the mouse buttons during an event.

Syntax

o = getMouseButtons(e);

Return Value

The function returns a object with boolean left, middle and right properties.

getMousePosition

The getMousePosition function retrieves the position of the mouse, relative to the document, during an event.

Note that this function is not available until the document is ready.

Syntax

a = getMousePosition(e);

Return Value

The function returns an array containing the top and left coordinates (in pixels.)

getMousewheelDelta

The getMousewheel function retrieves the distance and direction traveled by the mousewheel during an event.

Syntax

n = getMousewheelDelta(e);

Return Value

The function returns a number.

getOpacity

getOptionValue

The getOptionValue function retrieves the value of the specified option element.

Syntax

s = getOptionValue(el);

Return Value

The function returns a string.

getQuery

getScrollPosition

getStyle

getViewportClientRectangle

getViewportSize

getViewportScrollRectangle

getViewportScrollSize

hasAttribute

See Also

The hasAttribute function tests if the specified element has an attribute with the specified name.

Syntax

b = hasAttribute(el, name);

Return Value

The function returns a boolean.

hasClass

See Also

The hasClass function tests if the specified element has the specified CSS class.

Syntax

b = hasClass(el, className);

Return Value

The function returns a boolean.

importNode

The importNode function imports an element node from one document into another.

Syntax

el = importNode(el[, bImportChildren[, docNode]]);

Return Value

The function returns the imported element node.

isOwnProperty

The isOwnProperty function tests if the specified object does not inherit the specified property from its prototype. The property is stipulated to exist. This function is typically used to filter inherited properties within for-in loops.

Syntax

b = isOwnProperty(o, p);

Return Value

The function returns a boolean.

isPositionable

isPresent

isVisible

isXmlParseMode

The isXmlParseMode function tests if a document was parsed as XML.

Syntax

b = isXmlParseMode([docNode]);

Return Value

The function returns a boolean.

map

See Also

The map function calls the specified function for each element of the specified array, returning a new array of the results.

Syntax

a = map(a, fn[, context]);

Return Value

The function returns a new array.

maximizeElement

overlayElement

See Also

The overlayElement function positions an element to overlay another, optionally covering it.

Syntax

overlayElement(el, elOver[, cover]);

playAudio

playDirectXTransitionFilter

positionElement

preloadImage

See Also

The preloadImage function loads and stores the specified image resource.

Syntax

handle = preloadImage(src, h, w);

Return Value

The function returns a numeric handle to reference the stored image.

presentElement

removeClass

See Also

The removeClass function removes a CSS class from an element.

Syntax

removeClass(el, className);

removeOptions

See Also

The removeOptions function removes all options from a select element.

Syntax

removeOptions(el);

Requester

The Requester function is a constructor that creates an object that simplifies the process of sending Ajax requests.

Syntax

requester = new Requester([sId[, sGroup]]);

serializeFormUrlencoded

See Also

The serializeFormUrlencoded function encodes name/value pairs of a form element according to the specification of the application/x-www-form-urlencoded MIME type.

Syntax

s = serializeFormUrlencoded(form);

Return Value

The function returns a string.

setActiveStyleSheet

The setActiveStyleSheet function activates style sheets with the specified ID for a document. Style sheets with ID's other than the one specified are deactivated. This function is typically used to switch between alternate style sheets.

Syntax

setActiveStyleSheet(id[, docNode]);

setAttribute

See Also

The setAttribute function sets the value of the specified attribute of the specified element.

Syntax

el = setAttribute(el, name, value);

Return Value

The function returns an element, which in some cases may be a replacement (e.g. setting the type attribute of an input element in IE.)

setCookie

See Also

The setCookie function sets the cookie with the specified name to the specified value.

Syntax

setCookie(name, value[, expires[, path[, secure[, docNode]]]]);

setCookieCrumb

See Also

The setCookieCrumb function sets a portion of a cookie.

Syntax

setCookieCrumb(name, crumb, value[,path[, docNode]]);

setDefaultStatus

See Also

The setDefaultStatus function sets the default status bar text for a window.

Syntax

setDefaultStatus(text[, win]);

setElementHtml

See Also

The setElementHtml function sets the inner HTML of an element. The optional parameters are for use with effects modules (e.g. DirectX), which replace the standard function with one that supports progressive rendering.

Syntax

el = setElementHtml(el, html[options[, callback]]);

Return Value

The function returns an element, which in some cases may be a replacement (e.g. select elements in IE.)

setElementNodes

See Also

The setElementNodes function replaces the nodes of an element. The optional parameters are for use with effects modules (e.g. DirectX), which replace the standard function with one that supports progressive rendering.

Syntax

setElementNodes(el, elNewNodes[options[, callback]]);

setElementOuterHtml

See Also

The setElementOuterHtml function sets the outer HTML of an element. The optional parameters are for use with effects modules (e.g. DirectX), which replace the standard function with one that supports progressive rendering.

Syntax

el = setElementOuterHtml(el, html[options[, callback]]);

Return Value

The function returns an element, which is always a replacement.

setElementScript

See Also

The setElementScript function sets the text of a script element.

Syntax

setElementScript(el, text);

setElementText

See Also

The setElementText function sets the text of an element.

Syntax

setElementText(el, text);

setOpacity

setScrollPosition

setStatus

See Also

The setStatus function sets the status bar text for a window.

Syntax

setStatus(text[, win]);

setStyle

See Also

The setStyle function sets the style of the specified element.

Syntax

setStyle(el, style, rule);

setStyles

See Also

The setStyles function sets multiple styles of the specified element.

Syntax

setStyles(el, rules);

showElement

sizeElement

some

See Also

The some function calls the specified function for each element of the specified array, returning true if at least one result is true.

Syntax

b = some(a, fn[, context]);

Return Value

The function returns a boolean.

toggleElement

urlencode

See Also

The urlencode function encodes a string according to the specification of the application/x-www-form-urlencoded MIME type.

Syntax

s = urlencode(text);

Return Value

The function returns a string.

D

The D function constructs an object that abstracts a document.

E

The E function constructs an object that abstracts an element.

F

The F function constructs an object that abstracts a form element.

I

The I function constructs an object that abstracts an image element.

Q

The Q function constructs an object that abstracts multiple elements.

W

The W function constructs an object that abstracts a window.

dmark@cinsoft.net