Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>EDIT: </p> <p>Sorry read to fast and didn't see that you were looking specifically for the refresh functionality. As you hav noticed jQM doesn;t offer that on the anchor tag buttons.</p> <p>Well an alternative is just to replace the button with a new one and let jQM add the markup as before</p> <ul> <li><a href="http://jsfiddle.net/rfdQC/4/" rel="nofollow">http://jsfiddle.net/rfdQC/4/</a></li> </ul> <p>JS</p> <pre><code>$(function() { // Buttonize var $button = $("#myCrapButton"); var $clone = $button.clone(); $button.button(); // Change text on click $button.click(function() { $clone.text("Awesome Button"); $clone.button(); $button.replaceWith($clone); }); }); </code></pre> <p>Hope this helps!</p> <p>Original:</p> <p>You just need to drill down into the added markup that jQM adds. </p> <pre><code>&lt;a id="myCrapButton" href="#" class="ui-btn ui-shadow ui-btn-corner-all ui-btn-up-c" data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-theme="c"&gt; &lt;span class="ui-btn-inner"&gt; &lt;span class="ui-btn-text"&gt; Click me! &lt;/span&gt; &lt;/span&gt; &lt;/a&gt; </code></pre> <p>You're changing the button text:</p> <pre><code>&lt;a id="myCrapButton" href="#" class="ui-btn ui-shadow ui-btn-corner-all ui-btn-up-c" data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-theme="c"&gt; Awesome Button &lt;/a&gt; </code></pre> <p>Doing this you loose the added markup jQM needs to display the button. You need to change the nested span text.</p> <pre><code>$(function() { // Buttonize var $button = $("#myCrapButton"); $button.button(); // Change text on click $button.click(function() { $button.children().children().text("Awesome Button"); }); }); </code></pre> <p>no refresh needed:</p> <pre><code>&lt;a id="myCrapButton" href="#" class="ui-btn ui-shadow ui-btn-corner-all ui-btn-up-c" data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-theme="c"&gt; &lt;span class="ui-btn-inner"&gt; &lt;span class="ui-btn-text"&gt; Awesome Button &lt;/span&gt; &lt;/span&gt; &lt;/a&gt; </code></pre> <p>Live Example:</p> <ul> <li><a href="http://jsfiddle.net/rfdQC/3/" rel="nofollow">http://jsfiddle.net/rfdQC/3/</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload