mousemove events

Hi everyone I'm a beginner with javascript I 'm learning mousemove events I have this code
<div class="circle"></div>
<div class="circle"></div>
my JS:
<script>
const circle=document.querySelector('.circle');
window.addEventListener("mousemouse",()=>{
console.log("pat66");
});

</script>
<script>
const circle=document.querySelector('.circle');
window.addEventListener("mousemouse",()=>{
console.log("pat66");
});

</script>
I suppose to have in the console the message pat66 but I have nothing can I get some idea about what is going wrong ? thanks by advance.
4 Replies
Jochem
Jochem•12mo ago
you've misspelled the event name, it's mousemove nto mousemouse
Pat66
Pat66•12mo ago
thanks 😋 feeling stupid
MarkBoots
MarkBoots•12mo ago
I would suggest using pointermove. this will also catch touch devices ref: https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events
Pat66
Pat66•12mo ago
thanks
Want results from more Discord servers?
Add your server