Questions tagged [onmousemove]

The "onmousemove" event is a event that is triggered when the user moves the mouse pointer on an element.

Definition:

The onmousemove property is a JavaScript property which triggers the mousemove event when the user moves the mouse over an object.

Example Usage:

document.getElementById( '#example' ).onmousemove = function ()
{
    console.log( 'The onmousemove event has fired.' );
};

Important Links:

199 questions
1
vote
2 answers

How do I detect if a mouse / finger is moving along a certain path?

I'm developing an application for iPhone, and I want to detect when the user is moving his finger along a certain path. Specifically, I want to detect when the user moves their finger along a specific circular path. This would probably be easily…
Gilly
1
vote
0 answers

EyeBall wont follow onMouseMove event

I am trying to make an eye that follows the cursor in a web page using react. I have succesfully done it using vanilla HTML,CSS,and JS but is having trouble using React. I have called an event listener for the eyeball using onMouseMove, but it only…
Squish
  • 419
  • 4
  • 22
1
vote
0 answers

React - How to utilize smooth scroll and cursor elements

I'm creating a portfolio in React & Gatsby. I'm trying to achieve a scrolling animation effect similar to the one seen on Nana-Asia.com, in which a custom cursor follows the mouse cursor and expands when hovering over links. I managed to achieve…
liliripe
  • 13
  • 3
1
vote
1 answer

How to make mousemove run every specific time once

I'm trying to make a div move with the mouse (game). Here is a piece of jQuery code: var a = $('.player'); // the div i want it to move var all = $('.container'); // this is full hight / width container (all the page) $(all).mousemove(function (e)…
user11678472
  • 45
  • 1
  • 5
1
vote
1 answer

How to create this mouse interaction using javascript?

The following link shows a sample: https://www.google.com/logos/2016/halloween16/halloween16.html In this game the user needs to draw signs quickly with his mouse to defeat the approaching enemies. How I can detect these signs the user drawing with…
1
vote
1 answer

Catch OnMouseMove messages for edit control in a window created by createdialog?

I have a dialog window that is created by CreateDialog(). Within the dialog window is a text edit control which is created automatically by the CreateDialog() call, however I can't seem to catch OnMouseMove messages for it - only its parent window…
1
vote
1 answer

Add max movement to onMouseMove for scene in Three.JS

I have successfully added a really nice mouse movement to a scene in three.js where the camera sits inside the scene, facing one of four walls. Moving the mouse left or right pans and rocks the scene slightly. If you keep holding the mouse over one…
Kiki
  • 317
  • 1
  • 4
  • 18
1
vote
1 answer

JavaScript - Ignore if mouse is on a textarea's "resize handle"

I have the following code for a simple draggable textarea element: HTML: JavaScript: const mouseDown = element => { document.onmousemove = e => { element.style.left =…
APixel Visuals
  • 1,508
  • 4
  • 20
  • 38
1
vote
2 answers

C# WPF - Canvas MouseMove event firing even when mouse moves over child control

How to make it so the Canvas MouseMove event only fires if my mouse is over the Canvas and the Canvas only? I have a TextBox as a child of the Canvas and it still fires when my mouse is moving over that TextBox, i would like this to not happen, it…
Joao Vitor
  • 169
  • 1
  • 9
1
vote
2 answers

Increase two divs height on mouse move

I horizontally split a page of the browser with two divs, and I want to increase the height of a div and reduce it in the other using the mouse position on the y axis. It would enlarge the first div when I'm in the upper part of the page and enlarge…
mattia
  • 15
  • 6
1
vote
1 answer

Lags on onmousemove and div position

I'm trying to achieve a Glass Magnifier in JS.But something wrong when I try to set the position of my glass regarding to the cursor position: if I try to set the glass position to the center of the cursor, lags happened and I can't figure out…
Avaenity
  • 33
  • 6
1
vote
2 answers

Rotate multiple groups of shapes on mousemove

I have a group of diagonal lines following the mouse on move. This works fine if I only have one instance of the group on the page but I need to have multiple instances. When I duplicate the HTML, they do not work independently of each other and…
ob80
  • 97
  • 1
  • 12
1
vote
4 answers

isn't working only on Firefox

For some reason, this code works all chrome, safari, and ei but not on firefox.