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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:36:45+00:00 2026-05-28T14:36:45+00:00

i have <!DOCTYPE html> <html> <head> […] <script type=text/javascript src=jquery-1.7.js></script> <script type=text/javascript src=prototype.js></script> <script

  • 0

i have

<!DOCTYPE html>
<html>
<head>

[...]

<script type="text/javascript" src="jquery-1.7.js"></script>

<script type="text/javascript" src="prototype.js"></script>

<script type="text/javascript">
function getusto(anchorid) {
$(anchorid).scrollTo();
} 

</script>

[...]

</head>
<body>

[...]

<a class="menu_links" href="#" onclick="getusto('welcome');">Welcome</a><br> 
<a class="menu_links" href="#" onclick="getusto('guidelines');">Guidelines</a> 

[...]

<a name="welcome" id="welcome"></a> blah balhb albha 

[...]

<a name="guidelines" id="guidelines"></a> blah blahb alhb

[...]

</body>
</html>

why does clicking the welcome/guidelines links not scroll to the anchors?

i am trying to link to the ids specifically, due to using jquery-bbq which makes it (as far as i can tell) so i CAN’T use hashes/anchors normally.

they are making me use more characters to explain the code. how about we play one frame pac-man:

("< . . . . o . . . . 
                    . 
                    .
                    .
                    .
             [Post Your Answer]
  • 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-28T14:36:46+00:00Added an answer on May 28, 2026 at 2:36 pm

    It’s possible that the browser is performing the Element.scrollTo function and then following the link… which takes you to the top of the page (since the href is #).

    Why not try one of these two things and see what happens:

    Try return false; from the onclick: (see fiddle here)

    <a class="menu_links" href="#" onclick="getusto('welcome'); return false;">Welcome</a>
    <a class="menu_links" href="#" onclick="getusto('guidelines'); return false;">Guidelines</a> 
    

    Or make getusto return false: (see fiddle here)

    function getusto(anchorid) {
      $(anchorid).scrollTo();
      return false;
    } 
    

    …and return its value from the onclick:

    <a class="menu_links" href="#" onclick="return getusto('welcome');">Welcome</a>
    <a class="menu_links" href="#" onclick="return getusto('guidelines');">Guidelines</a> 
    

    Doing either of the two suggestions should allow the Element.scrollTo to take effect without following the original destination of the links.

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

Sidebar

Related Questions

I have this basic example: <!doctype HTML> <html> <head> <script src=jquery-1.4.2.min.js type=text/javascript></script> <script> $(document).ready(function(){
<!DOCTYPE html> <html> <head> <title></title> <script src=assets/js/jquery.js type=text/javascript></script> <script src=assets/js/jquery.validate.min.js type=text/javascript></script> <script type=text/javascript> $(document).ready(function()
I have the following html: <!DOCTYPE html> <html> <head> <script src=http://code.jquery.com/jquery-latest.js></script> </head> <body> <span>not
i have this code: <!DOCTYPE HTML> <html> <head> <script src=http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojo/dojo.js type=text/javascript djConfig=parseOnLoad: true></script> <script
I have the following code: <!DOCTYPE html> <html> <head> <script src=http://code.jquery.com/jquery-latest.min.js></script> <meta name=viewport content=initial-scale=1.0,
I have a problem with running jquery: <!DOCTYPE html> <html> <head> <meta http-equiv=Content-Type content=text/html;
Here's the code I currently have. <!DOCTYPE html> <html> <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8/>
I have the following page: <!DOCTYPE html> <html> <head> <style type=text/css> html, body {
I have the following code: <!DOCTYPE html> <html> <head> <link rel=stylesheet type=text/css media=screen href=jquery-ui-1.8.9.custom.css
I have a JavaScript function within an html file: <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML

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.