Corrected incorrect behaviour if calling loadingbar() on multiple elements