pedram
0
Q:

how to apply hover through inline css

<a href="abc.html"
   onMouseOver="this.style.color='#0F0'"
   onMouseOut="this.style.color='#00F'" >Text</a>
1
document.getElementById("mydiv").onmouseover= function(e){this.className += ' my-special-class'; };
document.getElementById("mydiv").onmouseleave= function(e){this.className = this.className.replace('my-special-class',''); };
1
document.head.insertAdjacentHTML('beforeend', '<style>#mydiv:hover{color:red;}</style>');
-1

New to Communities?

Join the community