[Jimmy]Changed the order of clearTimeOut and theItem.setAttribute in order to make the color animation more natural