I\'m using the new jquery mobile 1.0 alpha 1 release to build a mobile app and I need to be able to toggle the text of a button. Toggling the text works fine, but as soon a
I read through this and various options online and think I may have a simpler solution. It definitely works for links you are turning into a button with the data-role="button" attribute.
Simply put the text of the button in a separate span, and then change the contents of the span in your JavaScript.
e.g.
Mark Old
Then a simple
$('#oldBtnText').html("Old");
Will do the job. It also shouldn't be a problem if jQuery changes their structure.