</head>
<body onload="prettyPrint();">
<pre class="prettyprint lang-js">/*!
- * Ext JS Library 3.2.0
- * Copyright(c) 2006-2010 Ext JS, Inc.
- * licensing@extjs.com
- * http://www.extjs.com/license
+ * Ext JS Library 3.3.1
+ * Copyright(c) 2006-2010 Sencha Inc.
+ * licensing@sencha.com
+ * http://www.sencha.com/license
*/
/**
* @class Ext.CompositeElementLite
*/
-Ext.apply(Ext.CompositeElementLite.prototype, {
- addElements : function(els, root){
+Ext.apply(Ext.CompositeElementLite.prototype, {
+ addElements : function(els, root){
if(!els){
return this;
}
if(typeof els == "string"){
els = Ext.Element.selectorFunction(els, root);
}
- var yels = this.elements;
- Ext.each(els, function(e) {
- yels.push(Ext.get(e));
+ var yels = this.elements;
+ Ext.each(els, function(e) {
+ yels.push(Ext.get(e));
});
return this;
},
-
+
<div id="method-Ext.CompositeElementLite-first"></div>/**
* Returns the first Element
* @return {Ext.Element}
*/
first : function(){
return this.item(0);
- },
-
+ },
+
<div id="method-Ext.CompositeElementLite-last"></div>/**
* Returns the last Element
* @return {Ext.Element}
last : function(){
return this.item(this.getCount()-1);
},
-
+
<div id="method-Ext.CompositeElementLite-contains"></div>/**
* Returns true if this composite contains the passed element
* @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.
contains : function(el){
return this.indexOf(el) != -1;
},
-
+
<div id="method-Ext.CompositeElementLite-removeElement"></div>/**
* Removes the specified element(s).
* @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite
*/
removeElement : function(keys, removeDom){
var me = this,
- els = this.elements,
- el;
- Ext.each(keys, function(val){
- if ((el = (els[val] || els[val = me.indexOf(val)]))) {
- if(removeDom){
+ els = this.elements,
+ el;
+ Ext.each(keys, function(val){
+ if ((el = (els[val] || els[val = me.indexOf(val)]))) {
+ if(removeDom){
if(el.dom){
el.remove();
}else{
Ext.removeNode(el);
}
}
- els.splice(val, 1);
- }
- });
+ els.splice(val, 1);
+ }
+ });
return this;
- }
+ }
});
</pre>
</body>