$(window).load(function() { ShowProgressAnimation(); $('#logged-user-stats').empty(); $('#logged-user-stats').load(ajax_get_user_stats, "user_name=", function() { HideProgressAnimation(); }); });