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

  • Home
  • SEARCH
  • 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 8376381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:25:10+00:00 2026-06-09T15:25:10+00:00

Basically, I’m trying to have an auto scroll option for my site, I’ve got

  • 0

Basically, I’m trying to have an “auto scroll” option for my site, I’ve got the basis of it working, although it doesn’t re scroll back if you move the mouse back to the left rather than the right.

I’ve been at this for over 3 hours now, no luck what so ever searching the net!

Here’s what I have:

 $(document).mousemove(function(e){
    window.mouseXPos = e.pageX;
    window.mouseYPos = e.pageY; 
       var height = $(window).height() /2;
       if (window.mouseYPos < height){
        $('body,html').stop().animate({     
            scrollTop: window.mouseYPos
        },10 );
       }
       else{
        $('body,html').stop().animate({     
            scrollTop: -window.mouseYPos
        },10 );
       }    
    });
  • 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-09T15:25:11+00:00Added an answer on June 9, 2026 at 3:25 pm

    Try to delay your animation after 100ms where the mouse is not moving to avoid the new animation starts after each mouse pixel moving

    scrollDelayTimer = null;
    $(document).mousemove(function(e){
           window.mouseXPos = e.pageX;
           window.mouseYPos = e.pageY;
    
           clearTimeout(scrollDelayTimer);
           scrollDelayTimer = setTimeout(function () {
              scrollDelayTimer = null;
              $('body,html').stop().animate({
                  scrollTop: window.mouseYPos,
                  scrollLeft: window.mouseXPos
              },1000 );
           },100);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically I have a fixed size IFRAME with overflow: auto . The IFRAME displays
Basically, I have a UIImageView that will loop through 8 PNGs over 0.5 seconds.
Basically I have a large set of data in excel, and I was wondering
Basically, I have a list of delivery checkboxes one for deliver to this address
Basically, what I'm trying to create is a page of div tags, each has
Basically what I'm trying to do is make a very simple vertical bullet projectile
Basically I have an iframe loaded that is accessed from the parent whenever it
Basically, I have a JTextPane to hold some text which I wish to style.
Basically I have converted a tab delimited txt file into a list containing a
Basically, I have a main page (parent page) with a link that opens up

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.