Change data-theme in jQuery mobile
问题 I'd like to provide my user some persistent feedback after they've pressed a button (like it's indented or something). I tried: $(this).data('theme','b'); But that doesn't work. Q: Is there a way to show an indented button, or change it's data-theme on the fly? 回答1: I know this is an old question, but I just recently ran into this hurdle myself. The correct way of doing this would be as follows: $(this).buttonMarkup({theme: 'b'}); 回答2: I have been looking for a way to dynamically change the