当我将鼠标悬停在jQuery幻灯片的图像上时,如何添加暂停效果?如何在悬停时暂停幻灯片
$(document).ready(function() {
slideShow();
});
function slideShow() {
var showing = $('#slideshow .show');
var next = showing.next().length ? showing.next() : showing.parent().children(':first');
var timer;
showing.fadeOut(500, function() {
next.fadeIn(200).addClass('show');
}).removeClass('show');
setTimeout(slideShow, 3000);
}
OK,我出现的图像,但它不会改变图片。 – 2013-03-13 04:24:19
好吧,我又重新开始工作了,但似乎悬停并不奏效。 – 2013-03-13 04:36:11
@GarrettJohnson - 你是否用目标元素替换了'$(“body”)? – 2013-03-13 04:45:57