implemented spinner when ajax is loading