I have an timeline animation that plays when you click the red box. It first sets "display:none" on the #menu div and then continues to animate the #box div. The result is an expanded box with some content in it. To return to the menu you click on the close button on the top right, which will reverse the animation.
My problem is that sometimes the animation will break or not complete (I hope I picked the right terms there). So far only three cases have occurred:
the animation reverses successfully on reverse, the #box background will not return to it's initial transparent color, and remains blue; leaving an unwanted background color on reverse, the #menu display property is not reset to "display:block", instead it remains "display:none"
*note: 2 and 3 occur together, as far as I've seen
What I have done to recreate it is just keep refreshing the page, clicking the red box, and exiting the expanded div with the close button. Most of the time it runs fine, but when it doesn't then the user has no access to the menu. Also, the problem sometimes occurs when running the animation over and over, even without a refresh.
Any suggestions or insight into what I could be doing wrong?