Hi! I need to add the click event for each element of the CompositeElement and toggle its own class.


Code:
arr = Ext.select('.cMenuParentCollapsed'); 

arr.each(function(){ 
      this.on("click",function(e,t){ 
              this.toggleClass("cMenuParentExpanded"); 
      }); 
 });
when i do this, i can click on any item but it will only toggle the last item :S
What i'm i doing wrong?

Thanx!