I want to change a jquery-mobile buttons color swatch dynamically with javascript, but I can\'t\' find a way (except removing and adding all classes and event handlers, but
Buttons need to have the parent element theme changed as well.
Add the following code to the end of the $.fn.changeColorSwatch function
if(this.attr('type') == 'button'){ this.parent().changeColorSwatch(theme, type); }