I have a simple select query to select DOM node:
var selectNode = Ext.select('.myCSSClass textarea');
I want to apply a css class to textarea.
I have tried:
selectNode.addCls('newClass');
I have also tried using Ext.ComponentQuery to select the node and it doesn’t work.
I also tried using the apply() method:
Ext.apply(selectNode, {
cls: 'newClass'
});
Ext.selectreturns a array of elements that respond to the CSS selector you gave.If you want to add a CSS class to the
classattribute of this element you have to do this :Example :
Hope this helps