title: Force a refresh on a Jquery Mobile controlgroup button on small screen display
body: <p>I have a Jquery Mobile controlgroup with two buttons:</p>
  
  <pre><code>&lt;div data-role="controlgroup" data-type="horizontal" class="headerMenu iconposSwitcher"&gt;
    &lt;a href="#" data-role="button" data-icon="barcode" data-iconpos="left" class="EANView"&gt;EAN&lt;/a&gt;
    &lt;a href="#" data-role="button" data-icon="style" data-iconpos="left" class="styleView"&gt;Style&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>On larger screens (PC, iPad) I want the text to show ~ data-iconpos="left".
  On smaller screens (Mobile, Smartphone) there is little space, so I don't want to display the text ~ data-iconpos="notext"</p>
  
  <p>I can use the "refresh" function on select-menus. Is there a similar way to refresh controlgroups or button elements?</p>
  
  <p>I tried it like this, changes iconpos, but does not rebuild the button.</p>
  
  <pre><code>    if ($('body').width() &lt; 275)
        {
        $(".iconposSwitcher a").attr('data-iconpos','notext');
        $('.headerMenu').controlgroup('refresh', true);
        }
  </code></pre>
  
  <p>Thanks for hints &amp; Rgs</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>This works:</p>
  
  <pre><code>$(".iconposSwitcher a").removeClass('ui-btn-icon-left').addClass('ui-btn-icon-notext'); 
  </code></pre>
  
  <p>Easier than thought...</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>For div elements (controlgroup with <code>input</code>):</p>
  
  <pre><code>$(".iconposSwitcher-div a").attr('data-iconpos','notext').removeClass('ui-btn-icon-left ui-btn-icon-right').addClass('ui-btn-icon-notext');                                                                                                 
  </code></pre>