X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..92c2b89db26be16707f4a805d3303ab2531006e1:/docs/output/Ext.CompositeElementLite.html?ds=sidebyside diff --git a/docs/output/Ext.CompositeElementLite.html b/docs/output/Ext.CompositeElementLite.html index 1787b903..202a4097 100644 --- a/docs/output/Ext.CompositeElementLite.html +++ b/docs/output/Ext.CompositeElementLite.html @@ -1,32 +1,65 @@ -
Package: | Ext |
Defined In: | CompositeElementLite.js, CompositeElementLite-more.js |
Class: | CompositeElementLite |
Subclasses: | CompositeElement |
Extends: | Object |
var els = Ext.select("#some-el div.some-class");
- // or select directly from an existing element
- var el = Ext.get('some-el');
- el.select('div.some-class');
+Class Ext.CompositeElementLite
Package: Ext Defined In: CompositeElementLite.js,
CompositeElementLite-more.js Class: CompositeElementLite Subclasses: CompositeElement Extends: Object
This class encapsulates a collection of DOM elements, providing methods to filter
+members, or to perform collective actions upon the whole set.
+Although they are not listed, this class supports all of the methods of Ext.Element and
+Ext.Fx. The methods from these classes will be performed on all the elements in this collection.
+Example:var els = Ext.select("#some-el div.some-class");
+// or select directly from an existing element
+var el = Ext.get('some-el');
+el.select('div.some-class');
- els.setWidth(100); // all elements become 100 width
- els.hide(true); // all elements fade out and hide
- // or
- els.setWidth(100).hide(true);
-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.Public Properties
This class has no public properties.Public Methods
Method Defined By clear()
+els.setWidth(100); // all elements become 100 width
+els.hide(true); // all elements fade out and hide
+// or
+els.setWidth(100).hide(true);
+Public Properties
Property Defined By elements : ArrayThe Array of DOM elements which this CompositeElement encapsulates. Read-only.
+This will not usually be accessed in ...The Array of DOM elements which this CompositeElement encapsulates. Read-only.
+This will not usually be accessed in developers' code, but developers wishing
+to augment the capabilities of the CompositeElementLite class may use it when adding
+methods to the class.
+For example to add the nextAll
method to the class to add all
+following siblings of selected elements, the code would be
+Ext.override(Ext.CompositeElementLite, {
+ nextAll: function() {
+ var els = this.elements, i, l = els.length, n, r = [], ri = -1;
+
+// Loop through all elements in this Composite, accumulating
+// an Array of all siblings.
+ for (i = 0; i < l; i++) {
+ for (n = els[i].nextSibling; n; n = n.nextSibling) {
+ r[++ri] = n;
+ }
+ }
+
+// Add all found siblings to this Composite
+ return this.add(r);
+ }
+});
CompositeElementLite
Public Methods
Method Defined By add( Mixed els
)
+ :
+ CompositeElementAdds elements to this Composite object.Adds elements to this Composite object.Parameters:els
: MixedEither an Array of DOM elements to add, or another Composite object who's elements should be added.
Returns:CompositeElement
This Composite object.
CompositeElementLite clear()
:
voidRemoves all elements.Removes all elements.Parameters:- None.
Returns:- void
CompositeElementLite contains( el {Mixed}
)
:
BooleanReturns true if this composite contains the passed elementReturns true if this composite contains the passed elementParameters:{Mixed}
: elThe id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.
Returns:Boolean
CompositeElementLite each( Function fn
, [Object scope
] )
:
- CompositeElementCalls the passed function passing (el, this, index) for each element in this composite. The element
-passed is the fl...Calls the passed function passing (el, this, index) for each element in this composite. The element
-passed is the flyweight (shared) Ext.Element instance, so if you require a
-a reference to the dom node, use el.dom.Parameters:fn
: FunctionThe function to callscope
: Object(optional) The this object (defaults to the element)
Returns:CompositeElement
this
CompositeElementLite fill( String/Array els
)
+ CompositeElementCalls the passed function for each element in this composite.Calls the passed function for each element in this composite.
Parameters:fn
: FunctionThe function to call. The function is passed the following parameters:
+- el : ElementThe current Element in the iteration.
+This is the flyweight (shared) Ext.Element instance, so if you require a
+a reference to the dom node, use el.dom.
+- c : CompositeThis Composite object.
+- idx : NumberThe zero-based index in the iteration.
+
scope
: Object(optional) The scope (this reference) in which the function is executed. (defaults to the Element)
Returns:CompositeElement
this
CompositeElementLite fill( Mixed els
)
:
- CompositeElementClears this composite and adds the elements returned by the passed selector.Clears this composite and adds the elements returned by the passed selector.Parameters:els
: String/ArrayA string CSS selector, an array of elements or an element
Returns:CompositeElement
this
CompositeElementLite filter( String selector
)
+ CompositeElementClears this Composite and adds the elements passed.Clears this Composite and adds the elements passed.Parameters:els
: MixedEither an array of DOM elements, or another Composite from which to fill this Composite.
Returns:CompositeElement
this
CompositeElementLite filter( String/Function selector
)
:
- CompositeElementFilters this composite to only elements that match the passed selector.Filters this composite to only elements that match the passed selector.Parameters:selector
: StringA string CSS selector
Returns:CompositeElement
this
CompositeElementLite first()
+ CompositeElementFilters this composite to only elements that match the passed selector.Filters this composite to only elements that match the passed selector.Parameters:selector
: String/FunctionA string CSS selector or a comparison function.
+The comparison function will be called with the following arguments:
+el
: Ext.ElementThe current DOM element.
+index
: NumberThe current index within the collection.
+
Returns:CompositeElement
this
CompositeElementLite first()
:
Ext.ElementReturns the first ElementReturns the first ElementParameters:- None.
Returns:Ext.Element
CompositeElementLite getCount()
:
- NumberReturns the number of elements in this compositeReturns the number of elements in this compositeParameters:- None.
Returns:Number
CompositeElementLite indexOf( el {Mixed}
)
+ NumberReturns the number of elements in this Composite.Returns the number of elements in this Composite.Parameters:- None.
Returns:Number
CompositeElementLite indexOf( el {Mixed}
)
:
NumberFind the index of the passed element within the composite collection.Find the index of the passed element within the composite collection.Parameters:{Mixed}
: elThe id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.
Returns:Number
The index of the passed Ext.Element in the composite collection, or -1 if not found.
CompositeElementLite item( Number index
)
: