슬라이드 쇼가 있으며 슬라이드 쇼의 이미지에 대한 링크가 있습니다.빠른 슬라이드 쇼 오류가 표시됨
마우스가 링크에 들어가면 마우스를 놓으면 슬라이드 쇼가 일시 중지되고 재생됩니다.
내 문제는 링크를 통해 마우스를 빠르게 움직이면 슬라이드 쇼가 더 빠르고 더 빨리 나타나는 것입니다.
function begin_slideshow() {
some code
}
마우스 내가 진정으로 붙어 나처럼 잘하면 당신이 :) 도움이 될 수 있습니다, 문제가 어딘가에 가져가에 달려있다 생각 기능
element.on('mouseenter', function() {
var url = $(this).data('loc').replace('_t', '');//grabs the image
fig.attr("src", url);//changes the source
$('.shown').removeClass('shown');//the link that can be seen has a class of shown
$(this).addClass('shown');//adds class of shown to the now showing link
clearTimeout(timer);
}).on('mouseleave', function() {
timer = setTimeout(begin_slideshow, 5000);
});
두고/입력합니다.
편집
이 바이올린을 추가 http://jsfiddle.net/ – Dipak
http://jsfiddle.net/uYMkr/8/ –