title: remove and add attribute to button with jquerymobile 1.4
body: <p>I want to change add and remove disabled state for several buttons with one click. I use jquerymobile 1.4 and jquery 10.2 but the function doesn't work with those library versions.</p>
  
  <p>Here is the html :</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;  
      &lt;head&gt;
          &lt;title&gt;JQM latest&lt;/title&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  &lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.css"&gt;
  &lt;script src="http://code.jquery.com/jquery-1.10.2.min.js"&gt;&lt;/script&gt;
  &lt;script src="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div data-role="controlgroup" data-type="vertical"&gt;
      &lt;fieldset data-role="controlgroup" data-type="vertical"&gt;
          &lt;button id="btnPlay" class="ui-btn ui-shadow ui-corner-all ui-btn-icon-left ui-icon-video"&gt;Enregistrer&lt;/button&gt;
          &lt;button id="btnStop" disabled="" class="ui-btn ui-shadow ui-corner-all ui-btn-icon-left ui-icon-grid"&gt;Stop&lt;/button&gt;
          &lt;button id="btnLecture" disabled="" class="ui-btn ui-shadow ui-corner-all ui-btn-icon-left ui-icon-audio"&gt;Ecouter/Valider&lt;/button&gt;
          &lt;button id="btnDoItAgain" disabled="" class="ui-btn ui-shadow ui-corner-all ui-btn-icon-left ui-icon-audio"&gt;Recommencer&lt;/button&gt;
      &lt;/fieldset&gt;
      &lt;/div&gt;    
              &lt;/body&gt;
  </code></pre>
  
  <p>And the JS :</p>
  
  <pre><code>function recordAudio(src) {
      $('#btnPlay').attr('disabled', 'disabled').button('disable');
      $('#btnStop').removeAttr('disabled').button('enable');
  }    
  function stopAudio(src) {
      $('#btnLecture').removeAttr('disabled').button('enable');
      $('#btnStop').attr('disabled', 'disabled').button('disable');
  }    
  function playAudio(src) {
      $('#btnDoItAgain').removeAttr('disabled').button('enable');
      $('#btnLecture').attr('disabled', 'disabled').button('disable');
  }    
  
  $('#btnPlay').click(function(e) {
      recordAudio();
  });
  $('#btnStop').click(function(e) {
      stopAudio();
  });
  $('#btnLecture').click(function(e) {
      playAudio();
  });
  
  $("[button]").button();
  $("ul [data-role=controlgroup]").controlgroup();
  </code></pre>
  
  <p>Here is the <a href="http://jsfiddle.net/5B7Y2/" rel="nofollow">http://jsfiddle.net/5B7Y2/</a>
  Thanks for your help!</p>