I refer to this tutorial a lot when figuring out how to load things:
http://net.tutsplus.com/javascript-ajax/how-to-load-in-and-animate-content-with-jquery/

step 4 should be especially useful to you


On Aug 5, 12:57 pm, "Dave Maharaj :: WidePixels.com"
<d...@widepixels.com> wrote:
> I want to add .loading class before an element (#admin_content)
>
> so when a user clicks on a link it add the loading class before the
> #admin_content DIV but just can figure out to add the <div
> class="loading"></div>
>
> I do not want to load the pages up with loading div tags all over the site.
>
> $('a.admin_nav').click(function(){
>  var url = $(this).attr('href');
>  $('#admin_content').fadeOut('fast', function(){
> // want to add the loading step here
>   $('#admin_content').load(url, function(){
> //want to remove the loading class
>    $('#admin_content').fadeIn('fast');
>    });
>   });
>  return false;
>  });
>
> Can someone point me in the right direction?
>
> Dave

Reply via email to