Home › Forums › JavaScript › jQuery Sliding login forum troubles › Reply To: jQuery Sliding login forum troubles
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