Need help adding a preloader

Need help adding a preloader

Hello,

I'm looking to add a preloader image when content is loading into a <div> and then hide the image when it has loaded. Any ideas on how i could do this?

Here is my code so far:
<script type="text/javascript"><!--
   
     $(document).ready(function(){
      
   $("#feeds").load("Untitled-1.html");



        });
      
      
      
      
      
      
      
      
//--></script>
<div id="feeds" class="loading"></div>
</body>