Element.animate only if coordinate is in defined range