+ 5

What is JavaScript's equivalent for the Onmousedrag event?

15th May 2019, 12:11 PM
RedBlazerFlame [Less Active for a while]
RedBlazerFlame [Less Active for a while] - avatar
2 Respostas
+ 2
I just figured it out! --CODE-- var mouseisdown=false; function mouseup(){ mouseisdown=false; } function mousedown(){ mouseisdown=true; } function drag(){ if(mouseisdown){ //code here } } window.addEventListener("mouseup",mouseup) window.addEventListener("mousedown",mousedown) window.addEventListener("mousemove",drag)
23rd Jul 2019, 2:47 AM
RedBlazerFlame [Less Active for a while]
RedBlazerFlame [Less Active for a while] - avatar
0
ondrag? What are you trying to achieve? HTH and good luck!
16th May 2019, 8:16 PM
::sк::
::sк:: - avatar