adding spinner using js