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 8472215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:00:03+00:00 2026-06-10T17:00:03+00:00

I am currently using JS SmoothScroll on my main navigation to navigate smoothly around

  • 0

I am currently using JS SmoothScroll on my main navigation to navigate smoothly around a one page website. You can see it working fine here on the main navigation. It’s called by adding class=”scroll” to the link. The script can be seen here.

I’m trying to use the same javascript for my ‘back to top’ feature. At present the back to top feature works fine but it just ‘snaps’ to top so I’d like it to scroll like my other navigation does.

However, when I add class=”scroll” to that link, it stops working altogether.

  • 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-06-10T17:00:05+00:00Added an answer on June 10, 2026 at 5:00 pm

    The jQuery script you linked to will only scroll to an element by name, and you are using an id. Either modify the script to scroll to elements by id, or change the top element to have a name instead.

    $('[name="'+this.hash.substring(1)+'"]') //Select elements by name
    

    Note that the use of name attributes as anchors is generally frowned upon, so I would suggest updating the jQuery to use id, and updating all the other anchors on your page to have id attributes too.

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

Sidebar

Related Questions

Im currently using a script (that is working) where I can apply a certain
Im currently using Apache behind an Nginx Proxy which really works fine with one
Currently using maven Window Toolbar, I see Is it possible to fix this to
Currently using: @^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_]*)?$ How can i make http:// not compulsory but if it does
I`m currently using route53 for 2 domains that points to the same website. Lets
I am building a one page site that uses javascript to navigate vertically and
Currently using SASS on a website build. It is my first project using it,
Im currently using CodeIgniters active record class to UPDATE a MySQL table. One of
Currently using wxHTML to display a remote web page in a C++ Windows wxWidgets
I'm currently using http://benalman.com/projects/jquery-hashchange-plugin/ and I noticed that my hashes show up as /#page

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.