Skip to content

re: Add Dynamic Styling to HTML Elements With JavaScript VIEW POST


Reminds me of when JS was used inline in 'the old days' to swap images on mouse over. If my memory serves me correctly the code was something like this:

<IMG SRC="cat1.jpg" onmouseover="JavaScript:this.src='cat2.jpg' onmouseout='javascript:this.src='cat1.jpg'>

That looks right. It's the most basic introduction. I'm sure most people would use libraries and frameworks to make their lives easier.

code of conduct - report abuse