Tutorial :jQuery to Ext conversion



Question:

What's the equivalent of $('#id.class:input') in Ext? Or is there?


Solution:1

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.


Solution:2

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');  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »