-1
我发现这个伟大的垂直幻灯片脚本。 我的问题是,我无法找到一种方法来停止在鼠标上的幻灯片播放。 请你能帮我吗?先谢谢你 !在鼠标悬停停止jquery动画
setInterval(
function() {
$('#ticker div').each(function() {
$(this).animate({
'top': '-=10px',
}, 120,
function() {
var top = parseInt($(this).css('top').replace('px', '')) +
parseInt($(this).css('height').replace('px', ''));
if (top < 0) {
//console.log('removing', this)
var clone = $(this).clone();
var parent = $(this).parent();
clone.css('top', '550px');
$(this).remove();
parent.append(clone);
}
})
})
}, 40
)
你能,以帮助你解决问题提供了一个样本小提琴? – Hackerman