2

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?

Raptor
  • 53,206
  • 45
  • 230
  • 366

1 Answers1

1

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...

Subedi Kishor
  • 5,906
  • 5
  • 35
  • 53