+ 2

How I do that?

is there any way to make this transition happen when the mouse leaves? https://code.sololearn.com/WdDaIicLKgGA/?ref=app

6th Oct 2022, 11:21 PM
Gileade Lima
Gileade Lima - avatar
1 Réponse
+ 2
const h1 = document.getElementsByTagName("h1")[0]; window.onload = () => { h1.addEventListener("mouseover", Over); h1.addEventListener("mouseout", Out); } Over = () => { h1.style.color = '#FF0000'; } Out = () => { h1.style.color = '#0000FF'; } https://www.sololearn.com/compiler-playground/Wd8rIP7646Hr
7th Oct 2022, 12:13 AM
SoloProg
SoloProg - avatar