What's the equivalent of $('#id.class:input')
in Ext
?
Or is there?
views:
75answers:
2
+3
A:
My guess based on this reference Extjs quick start guide for jQuery Developers
// Select elements with CSS Selector
var elem = Ext.select("#id.class:input");
// or select directly from an existing element
var members = Ext.get('id');
var elem = members.select('input.class');
o.k.w
2010-01-07 09:03:22
+1
A:
I think you're looking for Ext.query('#id.class:input')
but whether Ext's CSS selector engine is robust enough to handle that particular request, I'm not sure off the top of my head. Probably, it is. In any case, the documentation says it returns an array of DOM elements that match your selector.
Edit: o.k.w. is right, too. query
returns raw DOM elements, while select
returns a CompositeElement
, which is closer to the way jQuery does things.
Joel Mueller
2010-01-07 09:03:55
I think Joel might be right too, after reading this: http://www.chnorton.com.au/2008/01/31/adventures-with-extjs-and-jquery/
o.k.w
2010-01-07 09:06:41
Haha well, for jQuery guys, "query" seems to be more intuitive. +1
o.k.w
2010-01-07 09:17:19
BTW,which of them has a longer history?
2010-01-07 09:25:33
My guess is ExtJS first. But I wouldn't compare them directly.
o.k.w
2010-01-07 11:47:26