+ 6

Can the click command be changed to hover in JavaScript? btn.addEventListener("click", myFunction);

https://code.sololearn.com/WfN0x9o5m536/?ref=app

12th Nov 2021, 3:31 PM
PASHA from Russia 🇷🇺
PASHA  from Russia  🇷🇺 - avatar
5 Respuestas
+ 3
This function may be work for computer. I want hover work for mobile phones instead of click. Thanks.
12th Nov 2021, 6:09 PM
PASHA from Russia 🇷🇺
PASHA  from Russia  🇷🇺 - avatar
+ 3
The thing is you cant hover in mobile phones, because you would have to click it🤷...but still "onmouseover" is the keyword to use.
12th Nov 2021, 7:57 PM
Okolo Sarah
Okolo Sarah - avatar
+ 2
I am sure there's a hover for JavaScript functions. Here's an example of it. https://code.sololearn.com/WZ3U9j5I98i6/?ref=app
27th Nov 2021, 7:05 PM
PASHA from Russia 🇷🇺
PASHA  from Russia  🇷🇺 - avatar
0
btn.addEventListener("mouseower", myFunction). Maybe this
12th Nov 2021, 5:54 PM
golovastik
golovastik - avatar