you don't have to pass outerContainer, just remove loadingInProgress here after the hide() call, other than that looks good