다음 버튼으로 작동하는 이미지 슬라이드 쇼를 만들었거나 화면의 오른쪽 또는 왼쪽을 클릭하면 다음 슬라이드가 표시됩니다.이중 클릭 문제
문제는 다음 단추를 클릭 할 때 클릭 바인딩이 실행되어 앞으로 2 슬라이드로 이동한다는 것입니다.
다음 버튼을 클릭하면 클릭 바인딩을 무시할 수 있습니까?!
$(opts.next).click(function(){
nextSlide();
});
function nextSlide() {
$slides.eq(currentSlide).fadeOut(opts.speed)
currentSlide++;
(currentSlide==totalSlides ? currentSlide=0 : false);
updateSlideSHow()
}
function previousSlide() {
$slides.eq(currentSlide).fadeOut(opts.speed)
currentSlide--;
(currentSlide<0 ? currentSlide=(totalSlides-1) : false);
updateSlideSHow()
}
$(this).bind('mouseup',function(e){
var ww = $(window).width();
(e.pageX < (ww/2) ? previousSlide() : nextSlide());
//alert(e.pageX+"<"+ww);
});
도움을 주셨습니다.
예 - 어쩌면 $ (문서)가 $ ('다른 것') 일 수 있습니다 - 건배 – v3nt