I am having a little trouble with a JQuery Slideshow in Internet Explorer. As it is for a company most of there clients use this browser so it is an issue than needs to be fixed.
Background
Website URL: http://www.m-square.co.uk/index.html
On 4 of the 5 pages within this website there is a Jquery powered slideshow, this works fine on Firefox, Chrome and Safari. However within IE it flicks through the whole slideshow in a split second before settling down to how it should work. Following research I believe this to be an issue with "z-index" within IE. Unfortunatly I can not fix it.
The Code I am Using
CSS
#slideshow {
position:relative;
height:300px;
width: 978px;
margin-top: 20px;
margin-bottom: 20px;
}
#slideshow IMG {
position:absolute;
top:0;
left:0;
opacity:0.0;
z-index: 8;
}
#slideshow IMG.active {
z-index:10;
opacity:1.0;
}
#slideshow IMG.last-active {
z-index:9;
}
HTML
<div id="slideshow">
<img src="images/Home/office1.jpg" alt="" class="active" />
<img src="images/Home/office2.jpg" alt="" />
<img src="images/Build/image4.jpg" alt="" />
<img src="images/Build/image6.jpg" alt="" />
<img src="images/Build/image8.jpg" alt="" />
<img src="images/Build/image5.jpg" alt="" />
<img src="images/Build/image2.jpg" alt="" />
<img src="images/Build/image3.jpg" alt="" />
<img src="images/Build/image1.jpg" alt="" />
<img src="images/Build/image9.jpg" alt="" />
<img src="images/Build/image7.jpg" alt="" />
</div>
JavaScript
<script type="text/javascript">
function slideSwitch() {
var $active = $('#slideshow IMG.active');
if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
var $next = $active.next().length ? $active.next()
: $('#slideshow IMG:first');
$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()", 4000 );
});
</script>
Jquery Version
/*
* jQuery 1.2.6 - New Wave Javascript
*
* Copyright (c) 2008 John Resig (jquery.com)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
* $Rev: 5685 $
*/
Any help would be greatly appreciated. Also just so you know I am NOT getting paid for this project as it is for my father. So I wont be gaining any money from your help. Don't want anyone to think I am trying to gain anything thing from any help I get.
I hope someone can be off help as it is an issue that needs to be fixed and is really annoying me.
Thankyou again in advance if you can offer any kind of help
James Taylor