【发布时间】:2010-03-30 11:18:27
【问题描述】:
我使用下面给出的函数:
function rotate() {
//Get the first image
var current = ($('div#rotator ul li.show') ? $('div#rotator ul li.show') : $('div#rotator ul li:first'));
//Get next image, when it reaches the end, rotate it back to the first image
var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div#rotator ul li:first') : current.next()) : $('div#rotator ul li:first'));
//Set the fade in effect for the next image, the show class has higher z-index
next.css({ opacity: 0.0 })
.addClass('show')
.animate({ opacity: 1.0 }, 1000);
//Hide the current image
current.animate({ opacity: 0.0 }, 1000)
.removeClass('show');
};
它会进行图像幻灯片放映。它在 Firefox 和 Google Chrome 上运行完美,但在 IE 7 和 IE 8 中剪辑图像。非常感谢任何帮助。
提前致谢。
【问题讨论】:
-
感谢布拉德编辑标签....这更有意义。希望我能尽快得到答复。
标签: jquery jquery-animate