kis-js/docs/$_.dom.html

1500 lines
18 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Namespace: dom</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: dom</h1>
<section>
<header>
<h2>
<span class="ancestors"><a href="$_.html">$_</a>.</span>
dom
</h2>
</header>
<article>
<div class="container-overview">
<div class="description">DOM
Dom manipulation module</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="DOM.js.html">modules/DOM.js</a>, <a href="DOM.js.html#line101">line 101</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="addClass"><span class="type-signature">&lt;static> </span>addClass<span class="signature">(class)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Adds a class to the element(s) specified by the current
selector
</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>class</code></td>
<td class="type">
<span class="param-type">string</span>
</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="DOM.js.html">modules/DOM.js</a>, <a href="DOM.js.html#line110">line 110</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="append"><span class="type-signature">&lt;static> </span>append<span class="signature">(htm)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Adds to the innerHTML of the current element, after the last child.
</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>htm</code></td>
<td class="type">
<span class="param-type">string</span>
</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="DOM.js.html">modules/DOM.js</a>, <a href="DOM.js.html#line279">line 279</a>
</li></ul></dd>
</dl>
<h5>Example</h5>
<pre class="prettyprint"><code>$_("ul").dom.append("&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;") adds an li element to the end of the selected ul element</code></pre>
</dd>
<dt>
<h4 class="name" id="attr"><span class="type-signature">&lt;static> </span>attr<span class="signature">(name, <span class="optional">value</span>)</span><span class="type-signature"> &rarr; {string}</span></h4>
</dt>
<dd>
<div class="description">
Sets attributes on element(s) specified by the current
selector, or, if name is not specified, returns the
value of the attribute of the element specified by the
current selector.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</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="attributes">
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
&lt;nullable><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="DOM.js.html">modules/DOM.js</a>, <a href="DOM.js.html#line171">line 171</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="css"><span class="type-signature">&lt;static> </span>css<span class="signature">(property, <span class="optional">value</span>)</span><span class="type-signature"> &rarr; {string}</span></h4>
</dt>
<dd>
<div class="description">
Sets or retrieves a css property of the element
specified by the current selector. If a value is
passed, it will set that value on the current element,
otherwise it will return the value of the css property
on the current element.
Accepts either key/value arguments, or an object with
multiple key/value pairs.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>property</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type">Object</span>
</td>
<td class="attributes">
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
&lt;nullable><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="DOM.js.html">modules/DOM.js</a>, <a href="DOM.js.html#line236">line 236</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="hide"><span class="type-signature">&lt;static> </span>hide<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Hides the element(s) specified by the current selector
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="DOM.js.html">modules/DOM.js</a>, <a href="DOM.js.html#line140">line 140</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="html"><span class="type-signature">&lt;static> </span>html<span class="signature">(<span class="optional">htm</span>)</span><span class="type-signature"> &rarr; {string}</span></h4>
</dt>
<dd>
<div class="description">
Sets or gets the innerHTML propery of the element(s) passed
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>htm</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
&lt;nullable><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="DOM.js.html">modules/DOM.js</a>, <a href="DOM.js.html#line304">line 304</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="prepend"><span class="type-signature">&lt;static> </span>prepend<span class="signature">(htm)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Adds to the innerHTML of the selected element, before the current children
</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>htm</code></td>
<td class="type">
<span class="param-type">string</span>
</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="DOM.js.html">modules/DOM.js</a>, <a href="DOM.js.html#line292">line 292</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="removeClass"><span class="type-signature">&lt;static> </span>removeClass<span class="signature">(class)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Removes a class from the element(s) specified by the current
selector
</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>class</code></td>
<td class="type">
<span class="param-type">string</span>
</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="DOM.js.html">modules/DOM.js</a>, <a href="DOM.js.html#line125">line 125</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="show"><span class="type-signature">&lt;static> </span>show<span class="signature">(<span class="optional">type</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Shows the element(s) specified by the current selector.
if type is specified, the element will have it's style
property set to "display:[your type]". If type is not
specified, the element is set to "display:block".
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">string</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="DOM.js.html">modules/DOM.js</a>, <a href="DOM.js.html#line151">line 151</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="text"><span class="type-signature">&lt;static> </span>text<span class="signature">(<span class="optional">value</span>)</span><span class="type-signature"> &rarr; {string}</span></h4>
</dt>
<dd>
<div class="description">
Sets or retrieves the text content of the element
specified by the current selector. If a value is
passed, it will set that value on the current element,
otherwise it will return the value of the current element
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
&lt;nullable><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="DOM.js.html">modules/DOM.js</a>, <a href="DOM.js.html#line204">line 204</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Index</a></h2><h3>Namespaces</h3><ul><li><a href="$_.html">$_</a></li><li><a href="$_.dom.html">dom</a></li><li><a href="$_.event.html">event</a></li><li><a href="$_.store.html">store</a></li></ul><h3>Global</h3><ul><li><a href="global.html#data[undefined]">data[undefined]</a></li></ul>
</nav>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha5</a> on Fri Sep 05 2014 11:56:00 GMT-0400 (EDT)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>