Data loading text on button
<p>I've checked similar questions here, but none of them seemed to solve my problem. </p>

<p>I'm trying to add data-loading-text to my submit button, but with no luck so far. </p>

<p>I'm using Bootstrap 4!</p>

<p>Here is my HTML:</p>

<pre><code>&lt;button type="submit" id="submit" class="btn btn-primary btn-lg mt-2" data-loading-text="Sending..."&gt;Submit message!&lt;/button&gt;
</code></pre>

<p>This was the last jquery code I tried:</p>

<pre><code>$(function() {
$(".btn").click(function(){
    $(this).submit('loading').delay(1000).queue(function() {
        // $(this).button('reset');
    });
});
});
</code></pre>

<p>Thanks</p>