For example,
<div class="level1">
</div>
I need to search for elements with class name starting with level and programatically replace them as "level2". How can this be done in extjs?
For example,
<div class="level1">
</div>
I need to search for elements with class name starting with level and programatically replace them as "level2". How can this be done in extjs?
Here's how. Look at the docs for the various functions to learn how to adapt.
var targets = Ext.query('.level1');
Ext.each(targets, function(domEl) {
Ext.fly(domEl) // get a reference to Ext.Element from the raw ROM element
.removeCls('level1')
.addCls('level2');
});