remove jQuery & re write spinner directive from jquery to javaScript