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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:30:25+00:00 2026-06-06T22:30:25+00:00

I am trying to call some functions whenever the mouse is moved wherever it

  • 0

I am trying to call some functions whenever the mouse is moved wherever it is located on the browser window. Currently, I am using:

$('html').live('mousemove', function(e) { ... }

which does not seem to work once the page scrolls down.

Is there a way to bind the mousemove event to the entire window?

$(window).live('mousemove', function(e) { ... }

results in nothing.

—

EDIT:

My code for the mouse function is as follows:

function mouseEvents() {



       // set up mouse movement
        $(window).on('mousemove', function(e) {
            if (window.imgLoaded) {
                var x = e.pageX/$(window).width()*504;
                var y = e.pageY/$(window).height()*504;
                console.log(y);
                drawKaleidoscope(window.ctx, window.img, x / 2, y / 2);
            }
        });
    }
  • 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-06T22:30:26+00:00Added an answer on June 6, 2026 at 10:30 pm

    $(document).bind("mousemove", function(e) { ... } )

    To trigger on scrolls as well (moving mousewheel doesn’t trigger mousemove)

    $(document).bind("mousemove mousewheel DOMMouseScroll", function(e) { ... } )

    where DOMMouseScroll is firefox specific event for mousewheel.

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

Sidebar

Related Questions

I'm trying to call some functions whenever the show/hide events happen on my DateField.
I'm trying to call some WFP functions from a C++ CLR class library (New
I am trying to write a program where I have to call some functions
I'm trying to write some functions/subroutines in a module that call another function in
I am trying to call some javascript functions which I ahve written in some
I'm trying to make my QTableWidget call some function when I change the values
I am trying to call a function, but am running into some struggles with
I'm trying to create a simple Java app that uses JNI to call some
here I am trying to call overloaded constructor after some condition has met in
I am trying to call a method that requires some parameters based on previous

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.