Hopefully the title is self explanatory, but I want to put an .on('click',function(){...})
type thing on divs with a specific class.
Hopefully this is simple and I have just skimmed over something...
thanks in advance
Hopefully the title is self explanatory, but I want to put an .on('click',function(){...})
type thing on divs with a specific class.
Hopefully this is simple and I have just skimmed over something...
thanks in advance
Share Improve this question asked Feb 25, 2011 at 5:43 neolaserneolaser 6,90719 gold badges59 silver badges92 bronze badges1 Answer
Reset to default 6You can use Ext.select
to select a bunch of elements and issue a single on
on all of them at once:
Ext.select(".mydivs").on("click", function () { ...
From the API doc:
Although they are not listed, this class supports all of the methods of Ext.Element and Ext.Fx. The methods from these classes will be performed on all the elements in this collection.