title: Add a loading gif to my loadmore jquery button
body: <p>So I have a load more button, and now I want to add a loading more gif to it so a user realizes it is running for the 1-2 seconds it takes to get the data.  This is my function:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  var pageNum = 2;
  $(document).on('click', '#loadmore', function() {
       $.get('/loadmore.php?page=' + pageNum + '&amp;aid=4', function(data) {
       $("#append").append(data);
          if(data){
              pageNum++; 
          }else{
              $('#loadmore').hide();  
          }
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>How would i go about adding a gif that appears only while the data is being loaded?</p>