I have a “login” button with a “click” function that redirects the user to another page.
But the thing is that after the user clicks on the “login” button a “fade” animation should take place, before the user is redirected to other page, and that is not happening, i.e. the user cant see the animation since he/she is redirected immediately to the other page and this doesn’t look good =(
How can I fix this?
Thank you!
Use a normal
buttoninstead ofsubmitfor your login button. When clicked, you call the fading function and on the callback function, you submit the form. E.g.jQuery
HTML
An example in action.