Skip to content
This repository was archived by the owner on Apr 5, 2020. It is now read-only.

Documentation

xurion edited this page Feb 24, 2013 · 1 revision

Main functions

setElement - Sets the element within which to wrap matched string patterns.

setPattern - Sets the pattern of text that will be wrapped.

setWrapper - Sets the type of element that will be the wrapper.

setAttribute - Sets a single attribute to each wrapper element.

setAttributes - Sets multiple attributes to each wrapper element.

setEvent - Sets an event that will be executed at a certain point during the wrapping process.

go - Begins the wrapping process.

Helpers

error - Throws an error.

isElement - Checks if an element is indeed an element.

isTextNode - Checks if an element is a TextNode.

hasClass - Checks if an element has a specific class.

isElementSet - Checks if the instance of Acronymizer has an element set.

isPatternSet - Checks if the instance of Acronymizer has a pattern set.

isWrapperSet - Checks if the instance of Acronymizer has a wrapper set.

addClassToElement - Adds a class to an element.

addAttributesToElement - Adds attributes to an element.

fireEvent - Executes an event that was stored with setEvent.

innerHighlight - Performs the main wrapping process.

init - Executed when Acronymizer is first initialised.

Clone this wiki locally