I want to change the src image on the main mouse image hover, I have one script, but it only works when there are two images, but I need to change the src image from several images.
My existing code is similar to
<img width="220" height="220" alt="DE709 Folding Sunglasses" src="/images/7804/1__63824.1339534463.220.220.jpg" onmouseover="this.src='/images/x/319/1__53737.JPG'" onmouseout="this.src='/images/7804/1__63824.1339534463.220.220.jpg'">
And the above code works fine for me, but I want something like this
<ul class="ProductList List">
<li class="Odd" style="height: 220px;">
<div data-product="1233" class="ProductImage QuickView" style="height: 244px; width: 220px;">
<a href="#">
<img alt="DE709 Folding Sunglasses" src="/images/7804/1__63824.1339534463.220.220.jpg">
<img style="display: none;" width="220" height="220" src="/product_images/x/319/1__53737.JPG">
<img style="display: none;" width="220" height="220" src="/product_images/w/307/1__63824.jpg">
<img style="display: none;" width="220" height="220" src="/product_images/l/017/DE-DISPLAY-BOX__82034.jpg">
</a>
<div>
</li>
<li>
<div data-product="1234" class="ProductImage QuickView" style="height: 244px; width: 220px;">
<a href="#">
<img alt="Designer Eyewearβ’ Folding Sunglasses DE706" src="/images/10064/DE706__95146.1346109648.220.220.jpg" />
<img width="220" height="220" src="/product_images/u/773/2__48597.JPG" style="display: none;">
<img width="220" height="220" src="product_images/w/403/1__41999.JPG" style="display: none;">
<img width="220" height="220" src="product_images/r/222/DE-DISPLAY-BOX__17353.jpg" style="display: none;"></a>
</div>
</li>
</ul>
when I hover over image.jpg the first time it shows me image1.jpg, when the mouse displays the image .jpg, and when it displays me image2.jpg a second time, etc., when I find 6 times, it shows me image 1. jpg again.
Before editing, I only have one div, and the whole solution works for me, but I need some changes. If I have more than one than what I do for him.
Google , , , , , .
.