jquery scroll to element with example

Scroll to element in jQuery

In this tutorial we will show you how to allow users scroll to specified element by clicking a links using jquery. Scroll to specific element (generally paragraphs or different sections) may be required for long content pages in your website. jQuery also provides scroll method, however to make scroll smooth we will use jquery animate method for our jquery scroll to element example.

A scroll to element example

In Example below jQuery animate() method is used to scroll to specified element. As “Move Middle” link is clicked the page will be scrolled to middle. Example below uses test text just to ensure scroll bars are there.

Experience this example online


Was this article helpful?

Related Articles

Leave A Comment?