打印版式

Class Ext.CompositeElement

Package:Ext
Class:CompositeElement
Extends:Object
Subclasses:CompositeElementLite
Defined In:CompositeElement.js
Standard composite class. Creates a Ext.Element for every element in the collection.

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.

All methods return this and can be chained.
var els = getEls("#some-el div.some-class");
 // or
 var els = Ext.Element.select("#some-el 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);

属性   -  方法   -  事件

公共属性

此类没有公共属性。

公共方法

方法 定义对象
  add(String/Array els) : CompositeElement CompositeElement
Adds elements to this composite.
  each(Function fn, [Object scope]) : CompositeElement CompositeElement
Calls the passed function passing (el, this, index) for each element in this composite.
  item(Number index) : Ext.Element CompositeElement
Returns the Element object at the specified index

公共事件

此类没有公共事件。

方法详情

add

public function add(String/Array els)
Adds elements to this composite.
参数:
  • els : String/Array
    A string CSS selector, an array of elements or an element
返回:
  • CompositeElement
    this
This method is defined by CompositeElement.

each

public function each(Function fn, [Object scope])
Calls the passed function passing (el, this, index) for each element in this composite.
参数:
  • fn : Function
    The function to call
  • scope : Object
    (可选) The this object (defaults to the element)
返回:
  • CompositeElement
    this
This method is defined by CompositeElement.

item

public function item(Number index)
Returns the Element object at the specified index
参数:
  • index : Number
返回:
  • Ext.Element
This method is defined by CompositeElement.

Ext - Copyright © 2006-2007 Ext JS, LLC
All rights reserved.