adds loading to the ajax views