Reputation: 1334
Example: In JQuery we call
var par = $('#container');
console.log($('.subcontainer', par).length);
In EXTJS how do we do that?
var par = Ext.get('container'); // Is the prepare parent object.
But Ext.select('.subcontainer', par).length
isn't working
Help me out in calling a class from an object using EXTJS.
Thanks in advance.
Upvotes: 0
Views: 41
Reputation: 30082
select
returns a collection class: http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.dom.CompositeElementLite
You want to call the getCount
method.
A better way to call it would be:
var items = Ext.get('container').select('.subcontainer');
Upvotes: 1