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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:36:38+00:00 2026-06-04T21:36:38+00:00

I am trying to get the scrollTo jquery work. Tried various tutorias/methods but none

  • 0

I am trying to get the scrollTo jquery work. Tried various tutorias/methods but none seem to work.
I am using it for a WP site and my idea is that there are some js files messing up each other.
The following .js are being used:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/jquery-ui-1.8.18.custom.min.js"></script>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/my_script.js"></script>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/jquery.hoverscroll.js"></script> 
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/jquery.scrollto-1.4.2-min.js"></script>

and i use this to fire:

$(document).ready(function(){
$("#box1btn").click(function(){
$("#ommig").slideto({
slide_duration: 5000,
});
});
});

but the slide is not…sliding, it’s just jumping because the anchor.

<a id="box1btn" href="#ommig">Om Mig</a>
<div id="ommig">Title</a>

source: http://djpate.com/2011/01/01/animated-scrollto-effect-jquery-plugin/

NB! I also used scrollto by Ariel Flesler, but got the same.

any ideas?
Thank you in advanced.

  • 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-04T21:36:39+00:00Added an answer on June 4, 2026 at 9:36 pm

    To counter the effect of clicking on an anchor tag, you should use event.preventDefault().

    $(document).ready(function(){
        $("#box1btn").click(function(event){
            event.preventDefault();  
            $('html, body').animate (
                 {scrollTop: $('#ommig').offset().top}, 5000
            );        
        });
    });
    

    See it in action here: http://jsfiddle.net/mhnmt/1/

    Edit: changed document.documentElement back to 'html, body' to fix Chrome issues.

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

Sidebar

Related Questions

So I've been trying to get Ariel Flesher's jQuery ScrollTo plugin work, but had
I am trying get Struts 2 and Tiles to work and I am using
I'm trying to install a jquery plugin but i cannot make it work. This
I'm trying to work with a jQuery script I found at http://marcgrabanski.com/articles/scrollto-next-article-button-jquery that allows
I'm using jQuery.scrollTop() to get the position of a scroll bar. I'm trying to
I am trying get all html links within a string and replace them using
I am trying get all html links within a string and replace them using
Trying to get parameters from a PUT request using HttpServlet#doPut: public void doPut(HttpServletRequest request,
Trying to get comfortable with jQuery and I have encountered some sample code that
Trying to get this to work, with no luck: [DataMember] public Type ParameterType {

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.