title: changing a button text after loading/resetting by bootstrap
body: <p>I'm trying to create like / unlike buttons using bootstrap3.</p>
  
  <p>Here is my button</p>
  
  <pre><code>&lt;button type="button" id="testBtn" 
  class="btn btn-success glyphicon glyphicon-thumbs-up"
  data-loading-text=" ... "  onclick="like()" &gt;
  4&lt;/button&gt;
  </code></pre>
  
  <p>Here is a simplified version of my JavaScript function without AJAX call:</p>
  
  <pre><code>    function like(){
      var btn = $('#testBtn');
      btn.button('loading');
  
      var current = parseInt(btn.text()); 
      current++;
  
      console.log(current);
  
      btn.button('reset');
      btn.text(current);
     }
  </code></pre>
  
  <p>Usually this works and button text increments on each click. </p>
  
  <p>However now that I'm using bootstrap, after resetting the button it keeps the old text even though in the <code>console.log(current);</code> I see a new incremented one.</p>
  
  <p>I think because I'm using bootstrap button loading/resetting I have to do something else to change button text.</p>