I'm trying to swap an image logo with text on mouse hover.
I have been looking at jquery and css to create this transition, but I haven't been lucky with finding a solution. Hopefully you can help me out a bit.
This is what I'm stuck with.
Example http://jsfiddle.net/VugzA/
HTML
<div id="logo">
<ul>
<li>
<a href="#home" title="Back to Home?">
<span class="logo_icon">
<img src="some.gif" alt="Logo image" width="45" height="55" />
</span>
<span class="text">Some Text</span>
</a>
</li>
</ul>
</div>
CSS
#logo ul {
list-style: none;
margin-left: -20px;
}
.logo_icon {
display: block;
}
.logo_icon:hover {
display: none;
}
.text {
display: none;
}
.logo_icon:hover + .text {
display: block
}