Posts made 5 years ago are seldom relevant today. And when you tag-on to somebody else's problem, it is seldom that it is exactly the same problem.
Please make a new post about your problem, and provide a demonstration of the problem using jsFiddle. We can't guess about the rest of your code that you haven't shown us. At the same time, please remove any parts that are not relevant to the problem. (And, in any case, it is my experience that in boiling down a problem to a simple demonstration, you will often find the solution along the way!)
What KevenB said 5 years ago is still true, though. You have something else going on.
Did you experiment to arrive at 1250? Does 0 work as well?
Did you insert an alert() for debugging that you didn't show above? You should not use alert() for debugging - use console.log().
I am taking wild stabs, since you've given us so little to go on.
Please start a new post.