//for IE/OPERA etc
document.onmousewheel = moveObject;
}
function moveObject(event)
{
var delta = 0;
if (!event) event = window.event;
// normalize the delta
if (event.wheelDelta) {
// IE & Opera
delta = event.wheelDelta / 60;
} else if (event.detail) {
// W3C
delta = -event.detail / 2;
}
var currPos=document.getElementById('scroll').offsetTop;
//calculating the next position of the object
currPos=parseInt(currPos)-(delta*10);
//moving the position of the object
document.getElementById('scroll').style.top = currPos+"px";
document.getElementById('scroll').innerHTML = event.wheelDelta + ":" + event.detail;
}
</script>
</head>
<body>
r<br>
r<br>
r<br>
r<br>
rr<br>
r<br>
r<br>
r
r
r
r
<div id="scroll">Dancing Div</div>
แบบนี้อ่ะคะ่ แต่จะเอามาใช้กะตัว paging นึกไม่ออกค่ะ ใครนึกออกช่วยบอกทีนะคะว่าจะทำไง