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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T23:22:09+00:00 2026-05-19T23:22:09+00:00

I have been at this for hours now and I simply cannot figure it

  • 0

I have been at this for hours now and I simply cannot figure it out.

Basically, I have a long list of items that gets populated way down the page. When the user clicks on one of these items, I want to scroll the window back to the very top where the content will be loaded (arguably poor design, I know, but that is a separate issue).

Here are what my scripts look like:

<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'></script>
<script type='text/javascript' src='scripts/jquery.jgrowl.js'></script>
<script type='text/javascript' src='scripts/javascript.js'></script>
<script type='text/javascript' src='scripts/supersized.js'></script>
<script type='text/javascript' src='scripts/effects.core.js'></script>
<script type='text/javascript' src='scripts/jquery.scrollTo-1.4.2-min.js'></script>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js'></script>

Here is the HTML of the top of my page:

<div id='header'>
<div id='pagetop'></div>
</div>

And this is the call that fails:

$.scrollTo('#pagetop',800)

It does not produce an error message when I attempt to run this line, so I know scrollTo is being loaded properly, but when I make the call, it simply does nothing.

Any help would be greatly appreciated.

  • 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-19T23:22:10+00:00Added an answer on May 19, 2026 at 11:22 pm

    jQuery doesn’t have a scrollTo method. But you can use .scrollTop()help on an object.

    $('#pagetop').scrollTop(800);
    

    Update

    If you just want an element to scroll into view, you can use the native DOM method:

    $('#pagetop')[0].scrollIntoView();
    

    or even

    document.getElementById('pagetop').scrollIntoView();
    

    Demo: http://www.jsfiddle.net/UHhDT/

    Update 2

    jQuerys scrollTop can also be used in .animate().

    $(document.body).animate({scrollTop: $('#pagetop').offset().top}, 2000);
    

    For instance:

    Demo: http://www.jsfiddle.net/UHhDT/1/

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

Sidebar

Related Questions

I have been spending the last hours trying to figure this out and now
I have been scratching my head for hours trying to figure out why this
Been sitting here for hours now trying to figure this out, so a bit
I have been working on this for 24 hours now, trying to optimize it.
i have been working on this sub-menu for 8 hours now, the last little
I have been stumped for 3 hours now on this problem, I need to
So I have been trying and battling with this for a few hours now.
Okay. Now I give up. I have been playing with this for hours. I
I have been researching this for a few hours and I feel that I
I've been working on this problem for 7 hours now, and I still have

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.