SlideUp in Animating Contact Form exercise requires System.threading...Sleep?
I have worked through the exercise on Animating the Contact Form (pg. 339). I have noticed one thing: The Sleep in the code behind affects the slideUp.
I thought the Please Wait message with the spinning .gif was silly at that point; so, I commented it out.
This is in the ControlForm.ascx.cs file. (The code behind for ControlForm.)
When I comment that line out, not making any other changes, the jQuery slideUp happens really fast or isn't even happening.
(I've gotten slightly mixed results with my testing and my browser cache seems it might be affecting it. So, I am not solid on the behavior yet. If I clear the browser, then I never see the slide up happen. Other times it just seems to happen very fast.)
If I uncomment it (so it is "active" if you will), then it works just fine. So, my question is: Why is this? Shouldn't that slideUp(3000) take 3 seconds regardless of the Thread.Sleep command?