I am using it in a drop down menu system. on mouse hover on a link the image of a parent div got switched and on mouse out it reverts the image. this variable I am using in html. Is there a way I can put this variable in my css sheet and call through an id or class?
In <li>
tag you can see the mouseover and mouseout, I want to give an class ot id to call this variable.
This is my html
<div onmouseover="changeImage(fashionSrc)" onmouseout="changeImage(fashionSrc1)">
<h3>Casuals</h3>
</div>
<ul>
<li onmouseover="changeImage(fashionSrc2)" onmouseout="changeImage(fashionSrc1)"><a href="#">Menu 1</a></li>
<li onmouseover="changeImage(fashionSrc3)" onmouseout="changeImage(fashionSrc1)"><a href="#">Menu 2</a></li>
<li onmouseover="changeImage(fashionSrc4)" onmouseout="changeImage(fashionSrc1)"><a href="#">Menu 3</a></li>
<li onmouseover="changeImage(fashionSrc5)" onmouseout="changeImage(fashionSrc1)"><a href="#">Menu 4</a></li>
<li onmouseover="changeImage(fashionSrc6)" onmouseout="changeImage(fashionSrc1)"><a href="#">Menu 5</a></li>
<li onmouseover="changeImage(fashionSrc7)" onmouseout="changeImage(fashionSrc1)"><a href="#">Menu 6</a></li>
</ul>