How to use Jquery $(".something") to select a class in ExtJS?

extjs

Solution

I think you are looking for:

Ext.query(".className");

This method allows you to get elements by the given query string like jQuery does.

EDIT

var els=Ext.query(".className"), ret=[];
for(var i=0; i<els.length; i++)
{
    ret.push(els[i].getWidth());
}

Problem

I'm looking for an equivalent method to select a class element like this $(".className") in Jquery for ExtJS. I understand that Ext.get() only takes in an id. Your help will be very much appreciated. Cheers, Mickey Edited: Let me explain further. I want to be able to do something like Ext.get after I did a "select". For example: ``` $(".className").css("width"); ``` I understand that Ext.Element has getWidth() method. I was hoping I can do something like... ``` Ext.select(".className").getWidth(); // it just return me [Object object] ``` Maybe i don't understand it well. Thanks a mil.

Original source