LIVE DEMO
$(function () {
$('ul.case-thumbs li').on("mouseenter mouseleave",function ( e ) {
var mEnt = e.type=="mouseenter";
$('img', this).stop().fadeTo(300, mEnt?0.6:1);
$('.thumbName', this).stop().fadeTo(300, mEnt?1:0);
});
});
HTML:
<ul class="case-thumbs clearfix">
<li>
<div class="hover">
<a href="#">
<span class="thumbName">ImageName</span>
<img src="http://lorempixel.com/output/food-q-c-1123-900-1.jpg" alt="test" />
</a>
</div>
</li>
</ul>
CSS:
span.thumbName{
position:absolute;
z-index:2;
display:none;
}
ul.case-thumbs li {
height: 165px;
width: 220px;
margin-right: 20px;
margin-bottom: 20px;
float: left;
list-style:none;
}
ul.case-thumbs li img {
vertical-align:middle;
height: 165px;
width: 220px
}
ul.case-thumbs li .hover {
background-color: #560963;
}