Reputation: 21
I have created 3 themes on http://jquerymobile.com/themeroller/. Each theme has a different button color. I tried to change the following button theme from data theme a to data theme c:
<button data-icon="star" data-theme="a" data-form="ui-btn-up-a" id="btnA" class="ui-btn-hidden" data-disabled="false">0,2 m3</button>
using this function:
$("#btnA").click(function()
{
$("#btnA").buttonMarkup({theme: 'c'});
});
but the color of btnA
doesn't change. How do I proceed?
Upvotes: 2
Views: 805
Reputation: 5996
Once you have set set the theme on the button you'll need to call refresh
on it like below...
$("#btnA").click(function() {
$(this).attr("data-theme","c").button('refresh');
});
Enjoy...
Upvotes: 1