There are several methods for accessing Elements:
The following examples use this HTML:
<div id='foo' class='x'></div> <div id='bar' class='x'></div>
Retrieve an Element by id:
var el = Ext.get('foo'); el.highlight(); // OR Ext.fly('bar').highlight();
Query by selector:
var els = Ext.select('.x'); // selects both var els = Ext.select('.x:first'); // only selects 'foo' els.highlight();