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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:07:21+00:00 2026-05-29T06:07:21+00:00

I have one page design with scrolling eased by jquery using this code: function

  • 0

I have one page design with scrolling eased by jquery using this code:

function ScrollMe(id){
                var offset = $("#"+id).offset().top-50;
                $('html,body').animate({scrollTop: offset},'slow');
         };

And this html:

<a onclick="ScrollMe('about')"  href="javascript:void(0)">About</a>

works fine, but what I need is to change href to “#about” so the url would be updated when is clicked on link. I just dont know how to keep easing in that case.

Thanks

EDIT
so for me works good enough this one:

 <a href="#contact" onclick="return scrollMe('contact');">
  • 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-29T06:07:22+00:00Added an answer on May 29, 2026 at 6:07 am

    Why not simply set id of anchor correctly set href? Like this, for example:

    <a href="#about" onclick="scrollMe('about'); return false;">About</a> 
    

    This correctly sets browser’s location, so it can be copied and transfered. But if you want animation to be played when your page is opened from another page, not this, you should call smth like scrollMe(location.hash) after page was loaded.

    NOTE: location.hash might note work on some browsers.

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

Sidebar

Related Questions

I am attempting a one page design using loads of jQuery. I have a
I'm new in flex. I have a design like this in one page have
I have one page website only using HTML, CSS and JavaScript. I want to
I'm doing an asp.net application with one page. In this page, I have one
I have one master page which applies to all pages in this website. On
I am using one DataGrid with templatecolumn of Asp:Label Control. In Design Page i
I have one problem in my home page design. Problem is that I don't
I have two jquery scripts on one page that both target on-site links via
I designed an dropdown sliding menu using jQuery. When on one page I added
I have Application written with GWT 1.7. I have one page where I upload

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.