當我將鼠標懸停在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