Setup a global loading animation istead on every div. Javascript - Jquery
<p>How can I setup a global loading instead on every div? The loading pic appears until all pages are loaded.</p>

<pre><code>  $(document).ready(function() {
    $('#termid').change(function() {

    var val = $(this).val();
    $('#firstresult').empty().addClass('loading').load(val + '.php', function(){$('#firstresult').removeClass('loading') });
    $('#secondresult').empty().addClass('loading').load(val + 'b.php', function(){$('#secondresult').removeClass('loading') });

    });
    });
</code></pre>
