Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1028461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:23:30+00:00 2026-05-16T12:23:30+00:00

I would like to implement the following feature using jQuery scrollTo function or some

  • 0

I would like to implement the following feature using jQuery scrollTo function or some other similar function that will achieve the same result.

I am basically going to have a DIV section on my page that will contains about 10 category URL links.

For example:

div id="categories">
  <a href="A">Section A</a>
  <a href="B">Section B</a>
  <a href="C">Section C</a>
  <a href="D">Section D</a>
   ...
   etc
</div>

Now below this DIV, I will have all these 10 category sections set out down the page with a number of images within each of the categories.

What I would like and unsure how to do using jQuery is that when a user say clicks on Section C above, I would like the page to scrollTo smoothly down the page to Section C heading that also has images underneath it and so that Section C title is now at the top of the page together with any images underneath it.

Section A
Image1-Image2 etc

Section B
Image1-Image2 etc

Section C
Image1-Image2 etc

Section D
Image1-Image2 etc

Now from here, I would also like another mechanism that would allow the user to return back to the Catergories DIV above, again using a smooth scroll To back to the top of the page to once again display each individual section.

I would like this for each section.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T12:23:30+00:00Added an answer on May 16, 2026 at 12:23 pm

    You could have markup like this:

    <div id="categories">
      <a href="#A">Section A</a>
      <a href="#B">Section B</a>
      //etc...
    </div> 
    
    <h3 id="A">Section A</h3>
    <div>
        Image1-Image2 etc<br />
        <a href="#categories" class="backToTop">Back to Top</a>
    </div>
    
    <h3 id="B">Section B</h3>
    <div>
        Image1-Image2 etc<br />
        <a href="#categories" class="backToTop">Back to Top</a>
    </div>
    //etc...
    

    And matching jQuery like this:

    $("#categories a, a.backToTop").click(function(e) {
        e.preventDefault();
        $('html, body').animate({ scrollTop: $(this.hash).offset().top });
    });
    

    You can give it a try here, there’s no need for plugins if you just want a simple scroll 🙂 The benefit of this approach is that if JavaScript is disabled, they’ll still get the scroll effect just without the animation, you can see what that looks like here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to implement a function with R that removes repeated characters in
I would like to implement the following feature onto my site. When a user
I would like to implement the following behaviour: I have a special media player,
I would like to implement the following simple pattern in an android app: Activity
I would like to implement something similar to 37Signals's Yellow Fade effect. I am
We would like to implement a web form that automatically saves content at regular
I am using jQuery datepicker, I have two datepicker input fields, like following: <html>
I've been following the new announcement regarding the new async feature that will be
I would like to implement a distinct thread for each route in apache camel.I
I would like to implement a very simple way to store a variable containing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.