Keep Checking until True
<p>Basically, I have a form that is handled by a CMS which I cannot edit it's javascript, but I more or less want to add in a "Loading" or "Sending" message to my users. For example. </p>

<p>Currently, the default form once submitted, will append a html success message to a div called 'success' once sent, but basically, I want to run a function on the submit button that keeps checking the 'success' for anything other than '' and once it isn't empty, turn off the loading symbol. </p>

<p>Something like this perhaps:</p>

<pre><code>$('#submitBtn').click(function(){
    $('#loadingDiv').show();
    while (!$('#success').html() == ''){
        $('#loadingDiv').hide();
    }
});
</code></pre>

<p>Any help would be greatly appreciated. I'm just not quite sure how to write it, I'm not great with jquery or javascript</p>

<p>Kind regards, 
Shannon</p>
