Loading
 
What's Next: View All Tutorial →

Extjs DOM searching

DOM Searching Methods child contains down findParent findParentNode (or up) getNextSibling getPrevSibling is select query up up   public function up( String selector, [Number/String/HTMLElement/Element maxDep...

Published Date: 07/09/2014  Last Modified Date: 07/09/2014    New Post



DOM Searching Methods

  • child
  • contains
  • down
  • findParent
  • findParentNode (or up)
  • getNextSibling
  • getPrevSibling
  • is
  • select
  • query
  • up

up

  public function up( String selector, [Number/String/HTMLElement/Element maxDepth] )
  Walks up the dom looking for a parent node that matches the passed simple selector (e.g. div.some-class or span:first-child). This is a shortcut for findParentNode() that always returns an Ext.Element.
 Parameters:
–selector : StringThe simple selector to test
–maxDepth : Number/String/HTMLElement/Element(optional) The max depth to search as a number or element (defaults to 10 || document.body)
Returns:
Ext.Element The matching DOM node (or null if no match was found)
This method is defined by Element.
<fieldset>
	<legend>Email</legend>
	<div>
		<input type="text" name="email" id="email" />
	</div>
</fieldset>
var el = Ext.get(‘email’).up(‘fieldset’);


Awaiting for Administrator approval





Tags: Basic Dom

← Back to list


Related Post




×