Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery Sliding login forum troubles Reply To: jQuery Sliding login forum troubles

#189583
Ilan Firsov
Participant

What I’d do is put the form in a wrapper with overflow:hidden and fixed width
Then inside that wrapper create 2 forms (register and login) which positioned absolutely (or relative, could work too) and move them outside the view with left/right properties.
Then using JQuery animate those left/right properties to display and hide the form when needed.

You don’t need JQuery for this animation, you can use pure JS though you will have to create the animation manually with loops and such, and you can even use CSS transitions to animate the change in the properties while using JS only to change classes

I created this example which uses JQuery animate()
http://codepen.io/ilanf/pen/WbQGvL