title: Show Loading.. using jquery in bootstrap 4 with data-loading-text
body: <p>I am trying to achieve a loading effect for a button, as demonstrated in <a href="https://codepen.io/jmalatia/pen/HkmaA" rel="noreferrer">codepen</a>.</p>
  
  <p>I am using <code>bootstrap 4</code> (beta 2) <code>Jquery 3.2.1</code>.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Group View&lt;/title&gt;
      &lt;link rel="stylesheet" media="all" href="../css/bootstrap.css" &gt;
      &lt;script src="../js/jquery.js"&gt;&lt;/script&gt;
      &lt;script src="../js/bootstrap-bundle.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
    &lt;div&gt;
      &lt;button type="button" class="btn btn-primary btn-lg"&gt;Submit Order&lt;/button&gt;
    &lt;/div&gt;
  
    &lt;script&gt;
      $(document).ready(function() {
        $('button').data('loading-text', 'loading...');
        $('.btn').on('click', function() {
          var $this = $(this);
          $this.button('loading');
          setTimeout(function() {
            $this.button('reset');
          }, 8000);
        });
      })
    &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The above code does not display "loading..." when the button is clicked.</p>