First off, I'm not a jQuery expert so I'm kind of fumbling in the dark here.
I'm trying to get a simple series of images to fade sequentially to create a slide show/image rotator effect. The effect works flawlessly in Firefox, Chrome, Safari and even IE 7 but for some reason nothing happens in IE 8. The slide show images don't display at all and the only thing that is visible is the default background image.
The relevant code from the page is:
- <div id="header-content">
- <!-- Facebook Badge START -->
- <a href="http://www.facebook.com/pages/Dominican-Coffee/111633487205" target="_TOP" title="Dominican Coffee">
- <img src="media/facebook-badge.gif" width="195" height="26" style="border: 0px; position: absolute; left: 0px; top: 0px; z-index: 100;" alt="Facebook Badge"/></a>
- <!-- Facebook Badge END -->
- <!-- Twitter Badge START -->
- <a href="http://www.twitter.com/marzan1" target="_TOP">
- <img src="media/follow-on-twitter.jpg" alt="Twitter Badge" width="219" height="26" style="border: 0px; position: absolute; left: 195px; top: 0px; z-index: 100;"/></a>
- <!-- Twitter Badge END -->
- <!-- jQuery Image Rotator -->
- <script type="text/javascript">
- $(function() {
- // create the image rotator
- setInterval("rotateImages()", 5000);
- });
- function rotateImages() {
- var oCurPhoto = $('#photoShow div.current');
- var oNxtPhoto = oCurPhoto.next();
- if (oNxtPhoto.length == 0)
- oNxtPhoto = $('#photoShow div:first');
- oCurPhoto.removeClass('current').addClass('previous');
- oNxtPhoto.css({ opacity: 0.0 }).addClass('current').animate({ opacity: 1.0 }, 1000,
- function() {
- oCurPhoto.removeClass('previous');
- });
- }
- </script>
- <!-- Slide Show Images -->
- <div id="photoShow">
- <div class="current"><img width="960px" height="160px" alt="Dominican Gold Coffee Wholesale" src="http://www.mtfarmerdesign.com/dg/banner-1.jpg" /></div>
- <div><img width="960px" height="160px" alt="Dominican Gold Coffee Wholesale" src="http://www.mtfarmerdesign.com/dg/banner-2.jpg" /></div>
- <div><img width="960px" height="160px" alt="Dominican Gold Coffee Wholesale" src="http://www.mtfarmerdesign.com/dg/banner-3.jpg" /></div>
- </div>
What am I missing here? Is there something about IE8 that I'm not aware of.
Oh yeah, if it helps, the site is driven by one of those cheap storefront packages that come from an ISP and it looks like it's running jQuery 2.5.18. Unfortunately I don't have any control over this so if it's a version-related issue are there any work-arounds?
Your help is massively appreciated!
Mark