R

jQuery Javascript Library v1.3.2 에 onmousewheel 이벤트 추가 하기..^^

jQuery JavaScript Library v1.3.2

3093 번째 줄을 보시면 아래와 같이 되어있습니다.

jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
 "mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave," +
 "change,select,submit,keydown,keypress,keyup,error").split(","), function(i, name){

 // Handle event binding
 jQuery.fn[name] = function(fn){
  return fn ? this.bind(name, fn) : this.trigger(name);
 };
});

빨간 색글자 들은 모두 이벤트를 나타냅니다. 빨간색글 맨뒤부분에 mousewheel 을 아래와 같이 추가해줍니다.

jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
 "mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave," +
 "change,select,submit,keydown,keypress,keyup,error,mousewheel").split(","), function(i, name){

 // Handle event binding
 jQuery.fn[name] = function(fn){
  return fn ? this.bind(name, fn) : this.trigger(name);
 };
});

추가하셨다면 저장을 한후..^^
사용법은 아래와 같이

$('#lightbox-image').mousewheel(function(e){
          alert(e.wheelDelta);
});

[이 게시물은 관리자님에 의해 2011-10-31 16:55:28 jQuery에서 이동 됨]
|

댓글 2개

파폭 에선 적용안됩니다..^^
직접수정하는 것 보다 플러그인 형태가 관리하기 좋을 것 같습니다.
http://plugins.jquery.com/search/node/mousewheel+type:project_project
댓글을 작성하시려면 로그인이 필요합니다. 로그인

프로그램

+
제목 글쓴이 날짜 조회
16년 전 조회 3,354
16년 전 조회 1,346
16년 전 조회 1,692
16년 전 조회 5,062
16년 전 조회 2,299
16년 전 조회 3,403
16년 전 조회 2,637
16년 전 조회 1,557
16년 전 조회 5,349
16년 전 조회 2,464
16년 전 조회 5,955
16년 전 조회 1,931
16년 전 조회 4,008
16년 전 조회 3,024
16년 전 조회 2,208
16년 전 조회 2,228
16년 전 조회 4,403
16년 전 조회 3,288
16년 전 조회 2,825
16년 전 조회 2,958
16년 전 조회 2,076
16년 전 조회 1,762
16년 전 조회 1,673
16년 전 조회 1,394
16년 전 조회 1,667
16년 전 조회 1,895
16년 전 조회 1,587
16년 전 조회 4,837
16년 전 조회 3,818
16년 전 조회 1,784
16년 전 조회 1,528
16년 전 조회 2,265
16년 전 조회 4,511
16년 전 조회 3,537
16년 전 조회 2,573
16년 전 조회 4,331
16년 전 조회 3,200
16년 전 조회 1,347
16년 전 조회 1,366
16년 전 조회 2,030
16년 전 조회 1,876
16년 전 조회 2,553
16년 전 조회 2,225
16년 전 조회 1,356
16년 전 조회 4,376
16년 전 조회 1,470
16년 전 조회 1,776
16년 전 조회 2,197
16년 전 조회 3,831
16년 전 조회 2,729
16년 전 조회 1,483
16년 전 조회 4,007
16년 전 조회 1,389
16년 전 조회 1,573
16년 전 조회 1,236
16년 전 조회 1,711
16년 전 조회 1,609
16년 전 조회 1,626
16년 전 조회 1,415
16년 전 조회 2,169
16년 전 조회 1,810
16년 전 조회 1,964
16년 전 조회 2,175
16년 전 조회 1,462
16년 전 조회 2,297
16년 전 조회 2,247
16년 전 조회 4,524
16년 전 조회 1,286
16년 전 조회 1,043
16년 전 조회 2,000
16년 전 조회 1,970
16년 전 조회 1,502
16년 전 조회 2,029
16년 전 조회 2,265
16년 전 조회 1,383
16년 전 조회 1,722
16년 전 조회 1,913
16년 전 조회 999
16년 전 조회 1,683
16년 전 조회 1,401
16년 전 조회 1,902
16년 전 조회 1,315
16년 전 조회 2,198
16년 전 조회 1,884
16년 전 조회 5,862
16년 전 조회 1,909
16년 전 조회 3,676
16년 전 조회 1,460
16년 전 조회 1,749
16년 전 조회 2,063
16년 전 조회 2,601
16년 전 조회 2,302
16년 전 조회 2,744
16년 전 조회 2,983
16년 전 조회 3,008
16년 전 조회 1,813
16년 전 조회 1,533
16년 전 조회 1,406
16년 전 조회 1,718
16년 전 조회 1,202
🐛 버그신고