added js code for spinner

added js code for spinner