For some reason I cannot make jQuery run things sequentially.
See: http://jsfiddle.net/Az9E2/
I would like to click a button, and have the following functions enacted sequentially:
- Give
focusto the textarea - Add a
box-shadowto textarea - Delay for
100ms - Add a
transitionclass to the textarea - Remove the
box-shadowand watch itfade outnicely
However, when I do it, it does everything an once, and so the box-shadow never appears.
Or, if I remove the final stage, then the box shadow fades in, meaning that (4) is happening BEFORE (2).
Any thoughts?
source: http://api.jquery.com/delay/
The other points you mention of course all happen (to the eye) at once, because there is no delay preventing it.
try: http://jsfiddle.net/JH4fM/2/