Here is what I still have:
$ (document) .ready (function () {
$ ('. inner'). hide ();
$ ("button"). click (function () {
$ ("# static_image"). hide ();
$ ('. inner'). slideToggle (300);
});
});
So basically the animated div is starting to hide. There's another div with a background image that is aligned to look like the animated div is still sticking out a bit. Then pressing the button causes the static div to disappear and the animated div to appear in view. However, I'm not sure how to make the tactics perfect so that they are smooth and people donโt know that there are two divs. An animated div takes a fraction of a second to get to where the div with the static image was located, however the static images disappear immediately, leaving a nonsmooth animation.
One more thing, how can I return a static div image at the moment when the animated div moves back after the user clicks? It cannot be at the moment when the user clicks the โcancelโ button, otherwise he will definitely appear before he suggested.
source share