출처: http://recoveryman.tistory.com/120
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | <!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>Document</title> <style></style> <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> <script> $(function(){ $("html, body").on('mousewheel DOMMouseScroll', function(e) { var E = e.originalEvent; delta = 0; console.log(E); if (E.detail) { delta = E.detail * -40; $('body').text(delta); }else{ delta = E.wheelDelta; $('body').text(delta); }; }); }); </script> </head> <body> </body> </html> | cs |
'web standard > jquery' 카테고리의 다른 글
이벤트 설정 시에 jQuery의 .on()을 사용하자. (0) | 2014.10.13 |
---|---|
[jquery] ajax 방법 (0) | 2014.04.11 |
jQuery Slider plugin (0) | 2014.01.09 |
width가 100%인 이미지에 맵 걸기 (0) | 2013.04.22 |
좌우(상하) 슬라이드 (0) | 2012.02.29 |