backoffice/node_modules/domhelper/doc/html/domhelper.html

2116 lines
26 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: domhelper</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">Class: domhelper</h1>
<section>
<header>
<h2>
domhelper
</h2>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="domhelper"><span class="type-signature"></span>new domhelper<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>A module that adds simple dom utility functionality.</p>
</div>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>yaw joseph etse</li>
</ul>
</dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="domhelper.js.html">domhelper.js</a>, <a href="domhelper.js.html#line21">line 21</a>
</li></ul></dd>
</dl>
</dd>
</div>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="closetElement"><span class="type-signature">&lt;static> </span>closetElement<span class="signature">(element)</span><span class="type-signature"> &rarr; {node}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns cloaset DOM element.</p>
</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>element</code></td>
<td class="type">
<span class="param-type">node</span>
</td>
<td class="description last"><p>html dom element</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="domhelper.js.html">domhelper.js</a>, <a href="domhelper.js.html#line105">line 105</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>closet node element</li>
</ul>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">node</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="elementContentWrapInner"><span class="type-signature">&lt;static> </span>elementContentWrapInner<span class="signature">(element, innerElement)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Wraps inner elements</p>
</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>element</code></td>
<td class="type">
<span class="param-type">node</span>
</td>
<td class="description last"><p>html dom element</p></td>
</tr>
<tr>
<td class="name"><code>innerElement</code></td>
<td class="type">
<span class="param-type">node</span>
</td>
<td class="description last"><p>element to wrap html dom element</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="domhelper.js.html">domhelper.js</a>, <a href="domhelper.js.html#line152">line 152</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="elementHideCss"><span class="type-signature">&lt;static> </span>elementHideCss<span class="signature">(element)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Hides DOM elements.</p>
</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>element</code></td>
<td class="type">
<span class="param-type">node</span>
</td>
<td class="description last"><p>html dom element</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="domhelper.js.html">domhelper.js</a>, <a href="domhelper.js.html#line133">line 133</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="elementShowCss"><span class="type-signature">&lt;static> </span>elementShowCss<span class="signature">(element)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Shows DOM elements.</p>
</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>element</code></td>
<td class="type">
<span class="param-type">node</span>
</td>
<td class="description last"><p>html dom element</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="domhelper.js.html">domhelper.js</a>, <a href="domhelper.js.html#line142">line 142</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="elementWrap"><span class="type-signature">&lt;static> </span>elementWrap<span class="signature">(element, wrapperElement)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Wraps element with wrapper</p>
</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>element</code></td>
<td class="type">
<span class="param-type">node</span>
</td>
<td class="description last"><p>html dom element</p></td>
</tr>
<tr>
<td class="name"><code>wrapperElement</code></td>
<td class="type">
<span class="param-type">node</span>
</td>
<td class="description last"><p>element to wrap html dom element</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="domhelper.js.html">domhelper.js</a>, <a href="domhelper.js.html#line171">line 171</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getElementSelector"><span class="type-signature">&lt;static> </span>getElementSelector<span class="signature">(element)</span><span class="type-signature"> &rarr; {string}</span></h4>
</dt>
<dd>
<div class="description">
<p>get element selector</p>
</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>element</code></td>
<td class="type">
<span class="param-type">node</span>
</td>
<td class="description last"><p>html dom element</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="domhelper.js.html">domhelper.js</a>, <a href="domhelper.js.html#line227">line 227</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>query selector string</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getHighIndex"><span class="type-signature">&lt;static> </span>getHighIndex<span class="signature">(selector)</span><span class="type-signature"> &rarr; {number}</span></h4>
</dt>
<dd>
<div class="description">
<p>returns the highest zindex</p>
</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>selector</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>query selector</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="domhelper.js.html">domhelper.js</a>, <a href="domhelper.js.html#line29">line 29</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>highest z-index</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getParentElement"><span class="type-signature">&lt;static> </span>getParentElement<span class="signature">(element, selector, selectorType)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>get parent element</p>
</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>element</code></td>
<td class="type">
<span class="param-type">node</span>
</td>
<td class="description last"><p>html dom element</p></td>
</tr>
<tr>
<td class="name"><code>selector</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>selector</p></td>
</tr>
<tr>
<td class="name"><code>selectorType</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>selector type (id or class)</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="domhelper.js.html">domhelper.js</a>, <a href="domhelper.js.html#line246">line 246</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getPosition"><span class="type-signature">&lt;static> </span>getPosition<span class="signature">(element)</span><span class="type-signature"> &rarr; {object}</span></h4>
</dt>
<dd>
<div class="description">
<p>get scroll position of element</p>
</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>element</code></td>
<td class="type">
<span class="param-type">node</span>
</td>
<td class="description last"><p>html dom element</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="domhelper.js.html">domhelper.js</a>, <a href="domhelper.js.html#line209">line 209</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>position element</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getScrollTop"><span class="type-signature">&lt;static> </span>getScrollTop<span class="signature">(element)</span><span class="type-signature"> &rarr; {number}</span></h4>
</dt>
<dd>
<div class="description">
<p>get scroll position of element</p>
</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>element</code></td>
<td class="type">
<span class="param-type">node</span>
</td>
<td class="description last"><p>html dom element</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="domhelper.js.html">domhelper.js</a>, <a href="domhelper.js.html#line186">line 186</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>position of scroll</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="nodeIndexOfNodeList"><span class="type-signature">&lt;static> </span>nodeIndexOfNodeList<span class="signature">(nodelist, element)</span><span class="type-signature"> &rarr; {number}</span></h4>
</dt>
<dd>
<div class="description">
<p>converts idnex of node in nodelist</p>
</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>nodelist</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>html dom element</p></td>
</tr>
<tr>
<td class="name"><code>element</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>html dom element</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="domhelper.js.html">domhelper.js</a>, <a href="domhelper.js.html#line81">line 81</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>index of element in nodelist</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="nodelistToArray"><span class="type-signature">&lt;static> </span>nodelistToArray<span class="signature">(nl)</span><span class="type-signature"> &rarr; {array}</span></h4>
</dt>
<dd>
<div class="description">
<p>converts nodelists to arrays</p>
</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>nl</code></td>
<td class="type">
<span class="param-type">node</span>
</td>
<td class="description last"><p>html dom element</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="domhelper.js.html">domhelper.js</a>, <a href="domhelper.js.html#line91">line 91</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>array of html nodes</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">array</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="removeAllClassAndToggle"><span class="type-signature">&lt;static> </span>removeAllClassAndToggle<span class="signature">(elementCollection, element, name)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>toggles class across nodelist/elementcollection</p>
</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>elementCollection</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>html dom element</p></td>
</tr>
<tr>
<td class="name"><code>element</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>html dom element</p></td>
</tr>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>of class!</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="domhelper.js.html">domhelper.js</a>, <a href="domhelper.js.html#line58">line 58</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="removeElement"><span class="type-signature">&lt;static> </span>removeElement<span class="signature">(elementCollection)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>removes element from dom</p>
</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>elementCollection</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>html dom element</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="domhelper.js.html">domhelper.js</a>, <a href="domhelper.js.html#line70">line 70</a>
</li></ul></dd>
</dl>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="domhelper.html">domhelper</a></li></ul>
</nav>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Sun May 18 2014 20:27:00 GMT-0400 (EDT)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>