0
안녕하세요, 마우스 휠 이벤트를 마지막으로 스크롤 한 곳을 확인하지 않고 위아래로 확인하는 방법이 있는지 확인하는 방법이 있습니다. 스크롤을 사용 중지하고 스크롤 대신 애니메이션을 사용했습니다.scrollTop을 사용하지 않고 위 또는 아래로 스크롤을 확인하는 방법은 무엇입니까?
var currentTop = 0;
var scrolling = false;
var allowNextAnimation = true;
$('.contactDiv').on('scroll touchmove mousewheel', function(e){
if (!scrolling && allowNextAnimation) {
if (scrollTop)
currentTop = currentTop + 70;
else if (scrollDown)
currentTop = currentTop - 70;
scrolling = true;
$('.contactDiv').animate({
scrollTop: currentTop
}, 500, function(){
scrolling = false;
allowNextAnimation = false;
});
return false;
}
allowNextAnimation = true;
});
scrollTop의 위치를 모른 채 마우스를 위아래로 스크롤 할 수 있는지 알기 위해서는 어떤 방법이 필요합니다. 어떤 충고? 마우스 휠 이벤트를
추적이 답변 확인 : http://stackoverflow.com/questions/18880159/use-jquery-to-check-mousewheel-event-without-scrollbar합니다. 스 와이프 이벤트의 경우 http://hammerjs.github.io/를 사용하시기 바랍니다. 관심이 있으시면 답변으로 설명해 드릴 수 있습니다. – drinchev