Scroll page after loading $(Document) with jQuery

Asked

Viewed 306 times

0

How to automatically scroll the page to 400 pixels below the top when loading the page with jQuery with scrollTop(); ?

<script>
    $(document).ready(function(){
        // ROLAR A PAGINA
    });
</script>

1 answer

0

I resolved so:

<script>
    $(document).ready(function(){
        $('html, body').animate({
            scrollTop: 320
        }, 1600);
    });
</script>

When loading the page, it automatically scrolls 320 pixels down smoothly at 1600ms.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.