Page 1 of 1

What is javascript to change button from swatchA to swatchB?

Posted: Fri Jan 22, 2016 2:21 am
by parent55

I've been looking in the Appery.io documentation, stackoverflow, and books. Now I'll try this. All I want to do is use javascript to dynamically change a button component from the swatchA to swatchB color. It seems like this should be a simple Appery call, but what is it?


What is javascript to change button from swatchA to swatchB?

Posted: Fri Jan 22, 2016 9:38 am
by Serhii Kulibaba

Hello,

Please add/remove swatch classes for that. e.g.:

Apperyio("buttonName").removeClass("ui-btn-a");
Apperyio("buttonName").addClass("ui-btn-b");