I'm trying to amend the jQuery I have right now which currently will display a colour on top of an image which is hovered over.
I instead need it to display the hover-over colour on all OTHER images when one is hovered over. Not to certain on the changes in this particular case.
So out of 6 images, if I mouse over 2, it will display the overlay on 1,3,4,5,6.
HTML:
<div class="wrap">
<img src="http://mirrorchecker.com/images/rod_160.png" width="160" class="company-image" />
<div class="company-image-overlay"></div>
<img src="http://mirrorchecker.com/images/rod_160.png" width="160" class="company-image" />
<div class="company-image-overlay"></div>
<img src="http://mirrorchecker.com/images/rod_160.png" width="160" class="company-image" />
<div class="company-image-overlay"></div>
CSS:
.company-image-overlay {
width: 160px;
height: 160px;
background-color: #ffb00f;
border-radius: 15px;
z-index: 1;
opacity: 0.5;
position: fixed;
top: 0.5em;
display:none;
}
jQuery:
$('.wrap').mouseover(function () {
$('.company-image-overlay').show();
}).mouseout(function () {
$('.company-image-overlay').hide();
});
JSFiddle: http://jsfiddle.net/davidThomas/AUzKE/8/