7 January
Posted by anonym
How can I get the class of a button. I can see the addClass & removeClass APIs, but what about getClass?
Thanks.
As I told you in a previous thread of mine, I'm trying to handle button style when they're pressed. You gave me a nice tip, thank you again. =D>
But could you please tell me why Firebug tells me Ext.get("id_btn_" + menu_1_crt).getEl is not a function when I would like to check if my toolbar button has already been just pressed? :((
if (!Ext.get('id_btn_' + menu_1_crt).getEl().hasClass("x-btn-pressed")) {
for (var i = 1; i < (menu_1_count + 1); i++) {
Ext.get('id_btn_' + i).removeClass("x-btn-pressed");
}
Ext.get('id_btn_' + menu_1_crt).addClass("x-btn-pressed");
}
Thank you.
#If you have any other info about this subject , Please add it free.# |
edit