Skip to content
atk edited this page Jun 17, 2011 · 2 revisions

Methods

Without useful Methods, the Selectors' results would be pretty worthless. The most important Methods are already available and the prototype object containing them is stored at t._ for ease of extension through Plugins.

Available Methods

The following Methods can be used out of the box:

Get/Set Attribute (a)

t(selector).a(name); // returns the value of the "name" attribute of the first selected node
t(selector).a(name, value); // set the attribute of all selected nodes to value
t(selector).a({ name1: value1, name2: value2 }); // sets multiple attributes at once

Get/Set CSS Styles (c)

Events (e)

Filter (f)

Get Node/Position (g)

HTML contents (h)

Iterate (i)

Remove (r)

Value (v)

Normalisation

All Normalisation filters are stored in t._.nf for easy extension through Plugins, each an array of getter and setter.

Clone this wiki locally