if (screen.width > 960 /*resolution at which the animation should be*/) { //here is code of animation }