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