On this topic: Change button text jquery mobile
http://stackoverflow.com/questions/4009524/change-button-text-jquery-mobile/11851231#11851231
Nick Craver wrote:
<a data-role="button" href="#" onclick="Podcast.consumed(); return false" id="consumed">
<span class="ui-btn-inner ui-btn-corner-all">
<span class="ui-btn-text">Mark Old</span>
</span>
</a>
and
$("#consumed .ui-btn-text").text("Mark New");
In Nick's solution the text Mark New is fixed. So, instead of having a fixed text "Mark New", the new text is from a variable? For example var newtext = "hello world"
What would the code then look like so that the text is truly variable? Meaning any dynamic text can be put on a button.