webgui/www/extras/extjs/docs/output/Ext.CompositeElement.html

142 lines
No EOL
7.1 KiB
HTML

<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Ext.CompositeElement</title>
<link rel="stylesheet" type="text/css" href="../resources/reset.css"/>
<link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="../resources/print.css" media="print">
<!-- GC -->
</head>
<body>
<div class="body-wrap">
<div class="top-tools">
<img src="../resources/print.gif" width="16" height="16" align="absmiddle">&nbsp;<a href="Ext.CompositeElement.html" target="_blank">Print Friendly</a><br/>
</div>
<h1>Class Ext.CompositeElement</h1>
<table cellspacing="0">
<tr><td class="label">Package:</td><td>Ext</td></tr>
<tr><td class="label">Class:</td><td>CompositeElement</td></tr>
<tr><td class="label">Extends:</td><td>Object</td></tr>
<tr><td class="label">Subclasses:</td><td><a href="Ext.CompositeElementLite.html">CompositeElementLite</a></td></tr>
<tr><td class="label">Defined In:</td><td><a href="CompositeElement.jss.html">CompositeElement.js</a></td></tr>
</table>
<div class="description">
Standard composite class. Creates a Ext.Element for every element in the collection.
<br><br>
<b>NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element
actions will be performed on all the elements in this collection.</b>
<br><br>
All methods return <i>this</i> and can be chained.
<pre class="highlighted"><code>var els = getEls("#some-el div.some-class");
<i>// or</i>
<b>var</b> els = Ext.Element.select("#some-el div.some-class");
els.setWidth(100); <i>// all elements become 100 width</i>
els.hide(true); <i>// all elements fade out and hide</i>
<i>// or</i>
els.setWidth(100).hide(true);</code></pre> </div>
<br />
<a href="#properties">Properties</a>
&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#methods">Methods</a>
&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#events">Events</a>
<hr />
<a name="properties"></a>
<h2>Public Properties</h2>
<div class="no-members">This class has no public properties.</div> <a name="methods"></a>
<h2>Public Methods</h2>
<table cellspacing="0" class="member-table">
<tr>
<th class="sig-header" colspan="2">Method</th>
<th class="msource-header">Defined By</th>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#add">add</a>(<code>String/Array els</code>) : CompositeElement</td>
<td class="msource" rowspan="2">CompositeElement</td>
</tr>
<tr>
<td class="mdesc">Adds elements to this composite.</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#each">each</a>(<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>) : CompositeElement</td>
<td class="msource" rowspan="2">CompositeElement</td>
</tr>
<tr class="alt">
<td class="mdesc">Calls the passed function passing (el, this, index) for each element in this composite.</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#item">item</a>(<code>Number index</code>) : Ext.Element</td>
<td class="msource" rowspan="2">CompositeElement</td>
</tr>
<tr>
<td class="mdesc">Returns the Element object at the specified index</td>
</tr>
</table>
<a name="events"></a>
<h2>Public Events</h2>
<div class="no-members">This class has no public events.</div>
<h2 class="mdetail-head">Method Details</h2>
<div class="detail-wrap">
<a name="add"></a>
<div class="mdetail">
<h3>add</i></h3>
<code>public function add(<code>String/Array els</code>)</code>
<div class="mdetail-desc">
Adds elements to this composite.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>els</code> : String/Array<div class="sub-desc">A string CSS selector, an array of elements or an element</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>CompositeElement</code><div class="sub-desc">this</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by CompositeElement.</div>
</div>
<a name="each"></a>
<div class="mdetail alt">
<h3>each</i></h3>
<code>public function each(<code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>)</code>
<div class="mdetail-desc">
Calls the passed function passing (el, this, index) for each element in this composite.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>fn</code> : Function<div class="sub-desc">The function to call</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The <i>this</i> object (defaults to the element)</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>CompositeElement</code><div class="sub-desc">this</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by CompositeElement.</div>
</div>
<a name="item"></a>
<div class="mdetail">
<h3>item</i></h3>
<code>public function item(<code>Number index</code>)</code>
<div class="mdetail-desc">
Returns the Element object at the specified index
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>index</code> : Number<div class="sub-desc"></div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Ext.Element</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by CompositeElement.</div>
</div>
</div>
</div>
<hr>
<div style="font-size:10px;text-align:center;color:gray;">Ext - Copyright &copy; 2006-2007 Ext JS, LLC<br />All rights reserved.</div>
</body>
</html>