Scroll effects similar to credit at the end of a movie

1

I'm trying to make the scroll roll all the data automatically, and when it's done go back to the beginning and start all over again.

I use this script:

<script type="text/javascript">
        $(document).ready(function(e) {
            var div = $('#teste');
            setInterval(function(){
                var pos = div.scrollTop();
                div.scrollTop(pos + 2);
            }, 200)
        });
    </script>

but I can not get it back to the beginning. Even reloading the page it does not come back. The effect you want is similar to the credits at the end of a movie.

Someone can help. Many thanks.

    
asked by anonymous 31.01.2017 / 13:03

0 answers