I want to select the div with class "icon-right" and add the click event.
Html code:
<div class="msg">
<div>
<div class="sample"></div>
</div>
<div>
<div class="icon-right"></div>
</div>
</div>
I want to select the div which has class icon-right and handle click event..
Extjs code:
var message = Ext.select('div:next(div.icon-right)');
message.on('click', function () {
alert('test msg');
}, message);
但是我需要在单击时将带有图标-right 类的 div 更改为带有图标-left 的 div,现在当我单击图标-left 时,它会更改为带有类图标-right 的 div .. 反之亦然