kis-js/docs/$_.html

1692 lines
22 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Namespace: $_</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Namespace: $_</h1>
<section>
<header>
<h2>
$_
</h2>
</header>
<article>
<div class="container-overview">
<div class="description">$_
Constructor function</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core.js.html">core.js</a>, <a href="core.js.html#line20">line 20</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Namespaces</h3>
<dl>
<dt><a href="namespaces.html#$_.dom"><a href="$_.dom.html">dom</a></a></dt>
<dd></dd>
<dt><a href="namespaces.html#$_.event"><a href="$_.event.html">event</a></a></dt>
<dd></dd>
<dt><a href="namespaces.html#$_.store"><a href="$_.store.html">store</a></a></dt>
<dd></dd>
</dl>
<h3 class="subsection-title">Members</h3>
<dl>
<dt>
<h4 class="name" id="el"><span class="type-signature">(static) </span>el<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Current selector object
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core.js.html">core.js</a>, <a href="core.js.html#line11">line 11</a>
</li></ul></dd>
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="$"><span class="type-signature">(static) </span>$<span class="signature">(selector, context<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></h4>
</dt>
<dd>
<div class="description">
Simple DOM selector function
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>selector</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>context</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core.js.html">core.js</a>, <a href="core.js.html#line74">line 74</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="delete"><span class="type-signature">(static) </span>delete<span class="signature">(url, data, success_callback, error_callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Sends a DELETE type ajax request
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last">The url to post to</td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
</td>
<td class="description last">delete parameters to send</td>
</tr>
<tr>
<td class="name"><code>success_callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="description last">callback called on success</td>
</tr>
<tr>
<td class="name"><code>error_callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">callback called if there is an error</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ajax.js.html">modules/ajax.js</a>, <a href="ajax.js.html#line136">line 136</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="each"><span class="type-signature">(static) </span>each<span class="signature">(callback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Iterates over a $_ object, applying a callback to each item
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">iteration callback</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core.js.html">core.js</a>, <a href="core.js.html#line114">line 114</a>
</li></ul></dd>
</dl>
<h5>Example</h5>
<pre class="prettyprint"><code>$_('form input').each(function(item) { alert(item) });</code></pre>
</dd>
<dt>
<h4 class="name" id="ext"><span class="type-signature">(static) </span>ext<span class="signature">(name, obj)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Adds the property `obj` to the $_ object, calling it `name`
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">name of the module</td>
</tr>
<tr>
<td class="name"><code>obj</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">the object to add</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="core.js.html">core.js</a>, <a href="core.js.html#line99">line 99</a>
</li></ul></dd>
</dl>
<h5>Example</h5>
<pre class="prettyprint"><code>$_.ext('foo', {});</code></pre>
</dd>
<dt>
<h4 class="name" id="get"><span class="type-signature">(static) </span>get<span class="signature">(url, data, success_callback, error_callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Sends a GET type ajax request
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last">The url to retrieve</td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
</td>
<td class="description last">get parameters to send</td>
</tr>
<tr>
<td class="name"><code>success_callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="description last">callback called on success</td>
</tr>
<tr>
<td class="name"><code>error_callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">callback called if there is an error</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ajax.js.html">modules/ajax.js</a>, <a href="ajax.js.html#line94">line 94</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="post"><span class="type-signature">(static) </span>post<span class="signature">(url, data, success_callback, error_callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Sends a POST type ajax request
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last">The url to post to</td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
</td>
<td class="description last">post parameters to send</td>
</tr>
<tr>
<td class="name"><code>success_callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="description last">callback called on success</td>
</tr>
<tr>
<td class="name"><code>error_callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">callback called if there is an error</td>
</tr>
</tbody>
</table>
<dl class="details">