Problem on IE7 with a simple slideshow
I'm using
this slideshow and i have a problem under IE : the display is weird and the slideshow won't restart when ended.
I didn't modify the code very much but instead of working directly with img's i work with li's.
Its works perfectly with Firefox.
The problem :
http://pub.straburo.fr/ (see with firefox then IE)
The code :
-
<ul id="homepageslideshow">
<li class="active">
<a href="/php5.alnetis.fr/straburo/1980-product-1980.html" title="FAUTEUIL STANLEY" class="product_image">
<img src="/php5.alnetis.fr/straburo/img/p/1980-7-slideshow.jpg" alt="FAUTEUIL STANLEY" />
<div class="infos">
<h5><a href="/php5.alnetis.fr/straburo/1980-product-1980.html" title="FAUTEUIL STANLEY">FAUTEUIL STANLEY</a></h5>
<span class="price">520,00 €</span>
<p class="product_desc"><a href="/php5.alnetis.fr/straburo/1980-product-1980.html" title="Plus">
Réf : STANLEY.8110
Fauteuil président. Support lombaire réglable. En cuir fleur...</a></p>
<a class="button exclusive" href="/php5.alnetis.fr/straburo/1980-product-1980.html" title="Voir">Voir</a>
<br />
<a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_1980" href="/php5.alnetis.fr/straburo/cart.php?qty=1&id_product=1980&token=30a6169651f1d8ff1d42135250bcce5e&add" title="Ajouter au panier">Ajouter au panier</a>
</div>
</a>
</li>
<li>
<a href="/php5.alnetis.fr/straburo/1981-product-1981.html" title="FAUTEUIL KEVIN" class="product_image">
<img src="/php5.alnetis.fr/straburo/img/p/1981-8-slideshow.jpg" alt="FAUTEUIL KEVIN" />
<div class="infos">
<h5><a href="/php5.alnetis.fr/straburo/1981-product-1981.html" title="FAUTEUIL KEVIN">FAUTEUIL KEVIN</a></h5>
<span class="price">530,00 €</span>
<p class="product_desc"><a href="/php5.alnetis.fr/straburo/1981-product-1981.html" title="Plus"> Fauteuil président. Lift. Pied aluminium noir. Basculant, axe décentré, réglable, blocage. Stock...</a></p>
<a class="button exclusive" href="/php5.alnetis.fr/straburo/1981-product-1981.html" title="Voir">Voir</a>
<br />
<a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_1981" href="/php5.alnetis.fr/straburo/cart.php?qty=1&id_product=1981&token=30a6169651f1d8ff1d42135250bcce5e&add" title="Ajouter au panier">Ajouter au panier</a>
</div>
</a>
</li>
<li>
<a href="/php5.alnetis.fr/straburo/1988-product-1988.html" title="FAUTEUIL DYLAN image slideshow" class="product_image">
<img src="/php5.alnetis.fr/straburo/img/p/1988-6-slideshow.jpg" alt="FAUTEUIL DYLAN image slideshow" />
<div class="infos">
<h5><a href="/php5.alnetis.fr/straburo/1988-product-1988.html" title="FAUTEUIL DYLAN">FAUTEUIL DYLAN</a></h5>
<span class="price">314,00 €</span>
<p class="product_desc"><a href="/php5.alnetis.fr/straburo/1988-product-1988.html" title="Plus"> Fauteuil président. Lift. Pied métal chromé. Basculant, réglable, blocage 1 position avant....</a></p>
<a class="button exclusive" href="/php5.alnetis.fr/straburo/1988-product-1988.html" title="Voir">Voir</a>
<br />
<a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_1988" href="/php5.alnetis.fr/straburo/cart.php?qty=1&id_product=1988&token=30a6169651f1d8ff1d42135250bcce5e&add" title="Ajouter au panier">Ajouter au panier</a>
</div>
</a>
</li>
</ul>
-
#homepageslideshow {
position:relative;
height:297px;
}
#homepageslideshow li {
position:absolute;
top:0;
left:0;
z-index:8;
}
#homepageslideshow li.active {
z-index:10;
}
#homepageslideshow li.last-active {
z-index:9;
}
-
/***
Simple jQuery Slideshow Script
Released by Jon Raasch (jonraasch.com) under FreeBSD license: free to use or modify, not responsible for anything, etc. Please link out to me if you like it :)
***/
function slideSwitch() {
var $active = $('#homepageslideshow li.active');
if ( $active.length == 0 ) $active = $('#homepageslideshow li:last');
// use this to pull the images in the order they appear in the markup
var $next = $active.next().length ? $active.next() : $('#homepageslideshow li:first');
// uncomment the 3 lines below to pull the images in random order
// var $sibs = $active.siblings();
// var rndNum = Math.floor(Math.random() * $sibs.length );
// var $next = $( $sibs[ rndNum ] );
$active.addClass('last-active');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active last-active');
});
}
$(function() {
setInterval( "slideSwitch()", 5000 );
});
Thanks for any help!