Effect JS slide div and another appears

3

Next I have a home where the user will come across a login field or a button to register. Clicking on the register button would like this current content to disappear from the screen by sliding to the left and the next registration card to appear sliding from the right and stopping in the middle.

Someone has some link with examples of preference with GSAP or some other plugin. I just need some reference to adapt to my project.

Thank you.

    
asked by anonymous 11.12.2015 / 14:51

1 answer

1

Hello, I think it's something like this ...

<script>
$(document).ready(function() {
    $("#btn-cadastrar").click(function() {
        $('#div-login').hide('slide', {direction: 'left'}, 1000);
        $('#div-cadastro').show('slide', {direction: 'right'}, 1000);
    });
});
</script>
    
11.12.2015 / 17:02