私は自分のページにスライダーを持っていて、マウスのホバーで停止し、もうマウスがないときにアニメーションを再開したいと思っています。マウスのホバーでアニメーションを停止する方法は?
私は.stop
コマンドで何か試しましたが、動作させることはできませんでした。 誰かが私を助けてくれますか?任意のキューに入れられたアニメーションを削除するstop()
使用clearQueue()
前
var $item = $('.carousel .item');
var $wHeight = $(window).height();
$item.eq(0).addClass('active');
$item.height($wHeight);
$item.addClass('full-screen');
$('.carousel img').each(function() {
var $src = $(this).attr('src');
var $color = $(this).attr('data-color');
$(this).parent().css({
'background-image' : 'url(' + $src + ')',
'background-color' : $color
});
$(this).remove();
});
$(window).on('resize', function(){
$wHeight = $(window).height();
$item.height($wHeight);
});
$('.carousel').carousel({
interval: 2000,
pause: "false"
});
$(this).stop(true);
どのカルーセルを使用しますか? – RRK