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,353
16년 전 조회 1,345
16년 전 조회 1,691
16년 전 조회 5,062
16년 전 조회 2,299
16년 전 조회 3,403
16년 전 조회 2,637
16년 전 조회 1,556
16년 전 조회 5,348
16년 전 조회 2,464
16년 전 조회 5,954
16년 전 조회 1,930
16년 전 조회 4,008
16년 전 조회 3,023
16년 전 조회 2,208
16년 전 조회 2,228
16년 전 조회 4,403
16년 전 조회 3,288
16년 전 조회 2,825
16년 전 조회 2,956
16년 전 조회 2,075
16년 전 조회 1,761
16년 전 조회 1,672
16년 전 조회 1,394
16년 전 조회 1,666
16년 전 조회 1,894
16년 전 조회 1,587
16년 전 조회 4,835
16년 전 조회 3,817
16년 전 조회 1,784
16년 전 조회 1,528
16년 전 조회 2,263
16년 전 조회 4,510
16년 전 조회 3,537
16년 전 조회 2,572
16년 전 조회 4,330
16년 전 조회 3,198
16년 전 조회 1,346
16년 전 조회 1,366
16년 전 조회 2,029
16년 전 조회 1,876
16년 전 조회 2,553
16년 전 조회 2,224
16년 전 조회 1,355
16년 전 조회 4,376
16년 전 조회 1,468
16년 전 조회 1,776
16년 전 조회 2,196
16년 전 조회 3,829
16년 전 조회 2,727
16년 전 조회 1,483
16년 전 조회 4,006
16년 전 조회 1,388
16년 전 조회 1,572
16년 전 조회 1,236
16년 전 조회 1,711
16년 전 조회 1,607
16년 전 조회 1,624
16년 전 조회 1,415
16년 전 조회 2,168
16년 전 조회 1,810
16년 전 조회 1,963
16년 전 조회 2,175
16년 전 조회 1,461
16년 전 조회 2,297
16년 전 조회 2,247
16년 전 조회 4,524
16년 전 조회 1,285
16년 전 조회 1,042
16년 전 조회 2,000
16년 전 조회 1,969
16년 전 조회 1,502
16년 전 조회 2,029
16년 전 조회 2,265
16년 전 조회 1,383
16년 전 조회 1,722
16년 전 조회 1,911
16년 전 조회 998
16년 전 조회 1,682
16년 전 조회 1,399
16년 전 조회 1,901
16년 전 조회 1,315
16년 전 조회 2,198
16년 전 조회 1,883
16년 전 조회 5,862
16년 전 조회 1,908
16년 전 조회 3,676
16년 전 조회 1,460
16년 전 조회 1,748
16년 전 조회 2,062
16년 전 조회 2,601
16년 전 조회 2,302
16년 전 조회 2,744
16년 전 조회 2,982
16년 전 조회 3,008
16년 전 조회 1,813
16년 전 조회 1,532
16년 전 조회 1,406
16년 전 조회 1,717
16년 전 조회 1,202
🐛 버그신고