$.fn.load() is asynchronous, you can use the complete callback:
$("#container").load("site.php", function(){ $(this).find('.users_count').html('TEST'); });
$(this).find('.users_count') isntead just $('.users_count') , because itโs better to set the appropriate context, in most cases you wouldnโt want the target elements to be descendants of the loaded content, depending on the used selector . In your case, this will not change anything, but sometimes who knows ...
source share