change animation and eliminate potential jquery lag issue