Namespace: $_

$_

$_ Constructor function
Source:

Namespaces

dom
event
store

Members

(static) el

Current selector object
Source:

Methods

(static) $(selector, contextopt) → {Object}

Simple DOM selector function
Parameters:
Name Type Attributes Description
selector string
context Object <optional>
Source:
Returns:
Type
Object

(static) delete(url, data, success_callback, error_callbackopt)

Sends a DELETE type ajax request
Parameters:
Name Type Attributes Description
url string The url to post to
data Object delete parameters to send
success_callback function callback called on success
error_callback function <optional>
callback called if there is an error
Source:

(static) each(callback)

Iterates over a $_ object, applying a callback to each item
Parameters:
Name Type Description
callback function iteration callback
Source:
Example
$_('form input').each(function(item) { alert(item) });

(static) ext(name, obj)

Adds the property `obj` to the $_ object, calling it `name`
Parameters:
Name Type Description
name string name of the module
obj object the object to add
Source:
Example
$_.ext('foo', {});

(static) get(url, data, success_callback, error_callbackopt)

Sends a GET type ajax request
Parameters:
Name Type Attributes Description
url string The url to retrieve
data Object get parameters to send
success_callback function callback called on success
error_callback function <optional>
callback called if there is an error
Source:

(static) post(url, data, success_callback, error_callbackopt)

Sends a POST type ajax request
Parameters:
Name Type Attributes Description
url string The url to post to
data Object post parameters to send
success_callback function callback called on success
error_callback function <optional>
callback called if there is an error
Source:

(static) put(url, data, success_callback, error_callbackopt)

Sends a PUT type ajax request
Parameters:
Name Type Attributes Description
url string The url to post to
data Object PUT parameters to send
success_callback function callback called on success
error_callback function <optional>
callback called if there is an error
Source:

(static) type(obj) → {string}

Retrieves the type of the passed variable
Parameters:
Name Type Description
obj *
Source:
Returns:
Type
string
Example
$_.type([]); // Returns 'array'