jQuery image fader slow in IE6 & 7
- by Jamie
Hi guys, I'm using the following jQuery script to rotate through a series of images pulled into an unordered list using PHP:
function theRotator() {
    $('#rotator li').css({opacity: 0.0});
    $('#rotator li:first').css({opacity: 1.0});
    setInterval('rotate()',5000);
};
function rotate() { 
    var current = ($('#rotator li.show') ?  $('#rotator li.show') : $('#rotator li:first'));
    var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('#rotator li:first') :current.next()) : $('#rotator li:first'));   
    next.css({opacity: 0.0}).addClass('show').animate({opacity: 1.0}, 2000);
    current.animate({opacity: 0.0}, 2000).removeClass('show');
};
$(document).ready(function() {      
    theRotator();
});
It works brilliantly in FF, Safari, Chrome and even IE8 but IE6 & 7 are really slow. Can anyone make any suggestions on making it more efficient or just work better in IE6 & 7?
The script is from here btw. Thanks.