Updated ancestorHasLoading to work properly, changed from ID to class for loading background