샘플
http://comlearn.co.kr/project1/mobile/mousewheel2.html
$(function(){
var last=0;
var indexP
var moveTop=0;
var sectionHeight=0;
function wheel(){
var winWidth=$(window).width();
$(".section").each(function(index){
if(winWidth>768){
$(this).on('DOMMouseScroll mousewheel', function(e){
if(e.originalEvent.wheelDelta > 0 || e.originalEvent.detail < 0) {
console.log("올렸어요");
if($(this).prev()!=undefined){
moveTop=$(this).prev().offset().top;
indexP=index-1;
}
}else{
console.log("내렸어요")
if($(this).next()!=undefined){
moveTop=$(this).next().offset().top;
indexP=index+1;
}
}
$("html,body").stop().animate({
scrollTop:moveTop
},500);
$(window).resize(function(){
var sectionHeight=$(".section").height();
$("html,body").stop().animate({
scrollTop:sctionHeight*indexN
},0);
});
});
}else{
$(this).off();
}
});
}
wheel();
$(window).resize(function(){
wheel();
});
});