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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:30:26+00:00 2026-06-09T17:30:26+00:00

Basically, the functionality is here, it just needs some refinement that I don’t know

  • 0

Basically, the functionality is here, it just needs some refinement that I don’t know how to tweak, I’ve written this small snippet that does exactly what I want, but doesn’t scroll the whole page, it just scrolls the “window” size.

Can anyone take this and make it amazing? 🙂

$(document).mousemove(function(e){
        percent = ((e.pageY) * 100) / $(this).height(); 
        $('body,html').scrollTop( percent);         
});
  • 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-09T17:30:28+00:00Added an answer on June 9, 2026 at 5:30 pm

    You may rather want to have a delta depending on how far the offset of mouse is with respect to the middle of the page: http://jsfiddle.net/BYUdS/2/. That way, you can keep scrolling down so that there is no scroll limit (what you have now).

    $(document).mousemove(function(e) {
        $("html, body").scrollTop(function(i, v) {
            var h = $(window).height();
            var y = e.clientY - h / 2;
            return v + y * 0.1;
        });
    });
    

    Here’s a version that performes smoother: http://jsfiddle.net/BYUdS/3/.

    var $elems = $("html, body");
    var delta = 0;
    
    $(document).on("mousemove", function(e) {
        var h = $(window).height();
        var y = e.clientY - h / 2;
        delta = y * 0.1;
    });
    
    $(window).on("blur mouseleave", function() {
        delta = 0;
    });
    
    (function f() {
        if(delta) {
            $elems.scrollTop(function(i, v) {
                return v + delta;
            });
        }
        webkitRequestAnimationFrame(f);
    })();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically the functionality that I'm trying to replicate is the @reply system as it
Basically I have a new client that is after the following functionality from her
I'm working on a small bit of functionality for three similar tabbed items. Basically,
I'm basically just posting tonight to get some feedback from some of you more
I know this questions has been asked a few times here. But these seem
I am adding some functionality to the HtmlHelper-class. Basically I want to automatically disable
I'm trying to get some JSON functionality to work, it's basically as simple as
I basically want the same functionality as facebook, twitter and all those other infinite
So basically, the print functionality does not work by default in Joomla but I've
My goal is to extend functionality of the current asset tracking system . Basically

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.