t() - DOM-Selectiont(selector, base, nomethods) selector: String with a CSS-Selector (consisting of the following selectors) base: Node as starting point for the Selection (default: document) nomethods: if the 3rd Argument is true, the result is a plain Array of Nodes without Methods.
~ (Siblings)Every selected Node will be replaced with its Siblings on the same level.
+ (Next)Replaces every Node with its direct neighbor down the DOM tree (if available, otherwise it is removed from the selection).
< (Parent)Replaces every Node with its parent; this filter is not standard, but rather useful.
<< (Parents)Replaces every Node with its parents (recursively); this filter is not standard, but rather useful.
Attributes
[key], [key=value] (Present/Equals)Returns only nodes to have the attribute key or if a value is given, those which have this value in their attribute.
[key!=value] (Not Equals)Returns only Nodes which have the attribute set with another value than those given.
[key^=value] (Starts with)Returns only those Nodes that have attribute values starting with the given value.
[key$=value] (Ends with)Returns only nodes, that have attribute values ending with the given value.
t._.a - Attributest().a([name/objekt],[wert]) If only an attributes name is given as argument, the value of the first selected node's attribute will be returned. If a value is given as second argument, all selected nodes will have their attribute set to that value. If an object with key-value-pairs is given as first argument, all selected nodes get multiple attributes set.
t._.c - CSS Attributest().c([name/objekt],[wert]) If only an attributes name is given as argument, the value of the first selected node's CSS style attributes will be returned. If a value is given as second argument, all selected nodes will have their CSS style attribute set to that value. If an object with key-value-pairs is given as first argument, all selected nodes get multiple CSS style attributes set.
t._.e - EventsPuts an event on all selected nodes (see t.e).
t._.f - FilterFilters the Selection with t.f (omit the first argument).
t._.g - GetIf a numerical index is given as first argument, it returns the node with that index. If a node is given, its index within the selection is returned (or -1). A string will be used as selection with the current selection as base.
t._.h - HTMLWithout arguments, it will return the HTML content of the first selected node, otherwise all selected nodes receive the given HTML content.
t._.i - IterateIterates over the selected nodes (see t.i, omit the first argument).
t._.v - ValuesIf the method is called without arguments, it returns (if present) the input value of the first selected node. If a string is supplied as argument, all selected nodes will have their values set to its contents. If t.p or another function is applied as argument, it will receive an Object with name:value pairs of all selected enabled nodes (that would result in GET or POST values).
Helpers
t.e - DOM-Eventst.e([Node/Selektion], [Eventname], [Function], [remove]) Sets a DOM event on the given Node(s). If "remove" is true, the function in the second argument will be removed from the Events. Without a function, the Event array for the Event will be returned. If even the event name is ommitted, the whole Event-Object for the first node is returned. As an addition, the document.ready-Event is available, which fires after the DOM is ready (or as fallback at window.onload).
t.i - Objekt-Iterationt.i([[copy,]] [Object], [Function], [asArray]) The Function in the second argument will be called with the Object in true (so it can be manipulated) and key/value as its two arguments. If copy is true instead of being ommitted, the Object is copied, so the copy can be manipulated before being returned. If "asArray" is set to true or 1, the Object will be iterated as array (useful for Selections).
t.f - Objekt-Filtert.f([Object], [Function], [asArray]) Filters Objects and Arrays after a Callback function, which receives each index and instance: if the function returns undefined on any instance, the latter will be removed from the returned Object/Array. If the only argument is an Array, t.f doubles as "unique"-Function, filtering out double entries. The optional Parameter "asArray", if set to true or 1, will make t.f filtering every input as if it was an Array (useful for Selections).
t.p - Objekt-ParameterizationTurns Objects into Strings. If only an Object is supplied as argument, it will be parameterized into an URL-Parameter-String. Otherwise the other arguments are Connector between key and value, the connector between the key-value-pairs, prefix, suffix and two conversion functions for key and value.
t.w - Where in the Array is my Instance?t.w([Object], [Array]) Like .indexOf for Arrays - returns the index of the searched Instance or -1 if not present: t.w(3, [4,3,2,1,0]) => 2
t.x - eXtend ObjectsExtends Objects with the Contents of any other Object (instances that are in both will be overwritten). Arrays will be merged, if an Object is merged into an array, the keys will be ommitted.
t.a - AJAXHandles AJAX-Requests, which are specified by an Object with at least an url-Instance. Other optional instances are method, data and async (Callback for asynchronous requests). On synchronous requests, the responseText is returned, on asynchronous requests the XHR object.
t.j - JS/JSONpIf only an URL is provided as argument, it will be used as Script-URL to load the corresponding script into the site. If a callback is specified as second argument by name or function, its name will be appended to the URL. If a timeout in ms is specified as third argument, the inclusion of scripts will be stopped (already loaded scripts stay loaded).
t.c - Cookie-Functiont.c([Name/Object]) - if a name is supplied, the value of the corresponding cookie is returned, if a cookie object in the following format is given, the cookie will be set: { name:"Cookie-Name", value:"Cookie-Wert", date:[Date-Objekt oder Number(ms)], domain:"*.test.de", path:"/", extra:"; secure"} (everything but name and value is optional)
t.er - Element Readyt.er([Selector], [Callback]) - runs the callback after at least one node matching the Selector becomes available.
JSON - JSON-ObjectIf not natively present, a JSON-Object with the Methods stringify and parse will be provided.
t.huffman - Huffman-CodecHuffman Compression-Codec, (un)packs redundant String-Data, E.g. to save space in localStorage.
t.huffman.enc([data]) - compress Data t.huffman.dec([data]) - uncompress Data
t.lzw - LZW-CodecLempel-Ziv-Welch Compression-Codec, (un)packs redundant String-Data, E.g. to save space in localStorage.
t.lzw.enc([data]) - compress Data t.lzw.dec([data]) - uncompress Data
outerHTML-NormalisingAdds outerHTML normalising to t().a, so this attribute can be used with Browsers that normally don't support it.
t._.p - Put-MethodPut-Method as counterpart to the Get-Method of Selections. If only a node is provided, the Selection will be appended. If 0 and a node is applied, the node will be replaced by the selection. if the first argument is 1, the selection will be prepended inside the node, and 2 makes the method prepending the selection outside the node.
t._.S - Selected-MethodMethod to read and manipulate the selection within text inputs and textareas.
CSS3-SelectorsAdds CSS3-Compatibility and other useful selectors to t().
t.u - URL-Objectt.u([URL:String]) returns an URL-Object similar to location.href, admittedly containing a params-Object with all GET-Parameters and a versatile toString-Method for absolute or relative URLs.