Get an Element's Property using its ID
Get an Element's Property using a CSS Selector
Create a New Element
Returns the selected options of a select element
Set an Element's property. Returns the element. You can either provide the element as a native object, by ID or by CSS selector.
Set Mulitple Properties of an Element. Returns the element. You can either provide the element as a native object, by ID or by CSS selector.
Remove a property from an Element. Returns the element. You can either provide the element as a native object, by ID or by CSS selector.
Tests an element to see if it matches the argument passed in.
Tests this Element to see if it matches the argument passed in.
Tests this Element to see if it matches the argument passed in.
Tests this Element to see if it matches the argument passed in.
Injects, or inserts, the Element at a particular place relative to the Element's children (specified by the second the argument).
Appends the Element at a particular place relative to the Element's children (specified by the where parameter).
Works like Element:grab, but allows multiple elements to be adopted and only appended at the bottom.
Inserts the passed element(s) inside the Element (which will then become the parent element).
Works like Element:grab, but allows multiple elements to be adopted and only appended at the bottom.
Inserts the passed element(s) inside the Element (which will then become the parent element).
Works like Element:grab, but replaces the element in its place, and then appends the replaced element in the location specified inside the this element.
Works like Element:grab, but instead of accepting an id or an element, it only accepts an HTML string. The HTML string will be parsed to create new DOM elements, and then injected relative to the element from where the method was called.
Works like Element:grab, but instead of accepting an id or an element, it only accepts text. A text node will be created inside this Element, in either the top or bottom position.
Removes the Element and its children from the DOM and prepares them for garbage collection
Clones the Element and returns the cloned one.
Optional args: contents - (boolean, optional: defaults to true) When set to false the Element's contents are not cloned.
keepid - (boolean, optional: defaults to false) When true the cloned Element keeps the id attribute, if present. Same goes for any of the cloned childNodes.
Replaces the passed Element with Element
Tests the Element to see if it has the passed in className
Adds the passed in class to the Element, if the Element doesnt already have it.
Works like Element:addClass, but removes the class from the Element
Adds or removes the passed in class name to the Element, depending on whether or not it's already present.
Returns the previousSibling of the Element (excluding text nodes).
Optional args: match - (string, optional): A tag name to match the the found element(s) with. A full CSS selector can be passed.
Like Element:getPrevious, but returns a collection of all the matched previousSiblings
As Element:getPrevious, but tries to find the nextSibling (excluding text nodes).
Like Element.getNext, but returns a collection of all the matched nextSiblings
Gets the first element that matches the passed in expression
Gets the last element that matches the passed in expression
Works as Element:getPrevious, but tries to find the parentNode
Like Element:getParent, but returns a collection of all the matched parentNodes up the tree.
Like Element:getAllPrevious but returns all Element's previous and next siblings (excluding text nodes). Returns as Elements
Returns all the Element's children (excluding text nodes). Returns as Elements.
Empties an Element of all its children
Reads the child inputs of the Element and generates a query string based on their values.
Returns the selected options of a select element
Gets multiple element attributes
Sets an attribute or special property for this Element
Sets numerous attributes for the Element
Removes an attribute from the Element
Removes numerous attributes from the Element
Stores an item in the Elements Storage, linked to this Element
Retrieves a value from the Elements storage. If default is provided and no data exists, the default value is returned.
Eliminates a key from the Elements storage
Sets the CSS style for an Element
Returns the style of the Element given the property passed in
Applies a collection of styles to the Element. Returns the element.
Returns an object of styles of the Element for each argument passed in
Attaches an event listener to a DOM element. Returns the element
Works as Element.addEvent, but instead removes the specified event listener.
The same as Element:addEvent, but accepts an object to add multiple events at once. Returns element
Removes all events from an Element.
Removes all events of a certain type from an Element.
Executes all events of the specified type present in the Element. Returns the element.
Arguments:
type - (string) The event name (e.g. 'click')
args - (mixed, optional) Array or single object, arguments to pass to the function. If more than one argument, must be an array.
delay - (number, optional) Delay (in ms) to wait to execute the event.
Clones all events from an Element to this Element.
Clones all events, of a specified type, from an Element to this Element.
Scrolls the element to the specified coordinated (if the element has an overflow). The following method is also available on the Window object.
Returns the height and width of the Element, taking into account borders and padding. The following method is also available on the Window object.
Returns an Object representing the size of the target Element, including scrollable area. The following method is also available on the Window object.
Returns an Object representing how far the target Element is scrolled in either direction. The following method is also available on the Window object.
Returns the real offsets of the element
Sets the position of the element's left and top values to the x/y positions you specify.
Returns an object with width, height, left, right, top, and bottom coordinate values of the Element.
Returns the parent of the element that is positioned, if there is one.
Element shortcut method which immediately transitions any single CSS property of an Element to a value.
Element shortcut method which immediately transitions any single CSS property of an Element from one value to another.
Element shortcut method for tween with opacity. Useful for fading an Element in and out or to a certain opacity level.
how - (mixed, optional: defaults to 'toggle') The opacity level as a number or string representation. Possible values include:
'in' - Fade the element to 100% opacity.
'out' - Fade the element to 0% opacity.
'show' - Immediately set the element's opacity to 100%.
'hide' - Immediately set the element's opacity to 0%.
'toggle' - If visible, fade the element out, otherwise, fade it in.
(number) - A float value between 0 and 1. Will fade the element to this opacity.
Element shortcut method which immediately transitions any single CSS property of an Element to a value.
Element shortcut method which immediately transitions any single CSS property of an Element from one value to another.