PDA

View Full Version : dinamically changing css class in button



hulek89
16 Nov 2010, 2:41 AM
Hye, is there anyway to change a css class assigned to element dynamically? i tried to do it with button and removeCls() and so on, but it doesn't seem to work at all.. anyone can help me with that?B)

tomalex0
16 Nov 2010, 6:00 AM
Remove the class that you wanted and then add new one. something like as mentioned below. It worked for me


button.addCls('x-button-action');
button.removeCls('x-button-decline');


Try using Webdeveloper Tool, it helps a lot.