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,352
16년 전 조회 1,345
16년 전 조회 1,690
16년 전 조회 5,061
16년 전 조회 2,297
16년 전 조회 3,402
16년 전 조회 2,635
16년 전 조회 1,554
16년 전 조회 5,347
16년 전 조회 2,463
16년 전 조회 5,954
16년 전 조회 1,930
16년 전 조회 4,006
16년 전 조회 3,021
16년 전 조회 2,208
16년 전 조회 2,226
16년 전 조회 4,403
16년 전 조회 3,286
16년 전 조회 2,822
16년 전 조회 2,954
16년 전 조회 2,075
16년 전 조회 1,761
16년 전 조회 1,670
16년 전 조회 1,393
16년 전 조회 1,665
16년 전 조회 1,894
16년 전 조회 1,586
16년 전 조회 4,835
16년 전 조회 3,817
16년 전 조회 1,782
16년 전 조회 1,526
16년 전 조회 2,261
16년 전 조회 4,509
16년 전 조회 3,537
16년 전 조회 2,571
16년 전 조회 4,329
16년 전 조회 3,198
16년 전 조회 1,346
16년 전 조회 1,366
16년 전 조회 2,027
16년 전 조회 1,875
16년 전 조회 2,552
16년 전 조회 2,224
16년 전 조회 1,355
16년 전 조회 4,375
16년 전 조회 1,468
16년 전 조회 1,774
16년 전 조회 2,195
16년 전 조회 3,828
16년 전 조회 2,725
16년 전 조회 1,483
16년 전 조회 4,005
16년 전 조회 1,388
16년 전 조회 1,572
16년 전 조회 1,236
16년 전 조회 1,711
16년 전 조회 1,606
16년 전 조회 1,624
16년 전 조회 1,415
16년 전 조회 2,168
16년 전 조회 1,810
16년 전 조회 1,963
16년 전 조회 2,174
16년 전 조회 1,461
16년 전 조회 2,295
16년 전 조회 2,246
16년 전 조회 4,524
16년 전 조회 1,285
16년 전 조회 1,041
16년 전 조회 2,000
16년 전 조회 1,969
16년 전 조회 1,502
16년 전 조회 2,029
16년 전 조회 2,264
16년 전 조회 1,383
16년 전 조회 1,722
16년 전 조회 1,911
16년 전 조회 997
16년 전 조회 1,682
16년 전 조회 1,398
16년 전 조회 1,900
16년 전 조회 1,313
16년 전 조회 2,198
16년 전 조회 1,882
16년 전 조회 5,862
16년 전 조회 1,906
16년 전 조회 3,676
16년 전 조회 1,458
16년 전 조회 1,747
16년 전 조회 2,061
16년 전 조회 2,601
16년 전 조회 2,301
16년 전 조회 2,744
16년 전 조회 2,981
16년 전 조회 3,007
16년 전 조회 1,813
16년 전 조회 1,531
16년 전 조회 1,404
16년 전 조회 1,715
16년 전 조회 1,199
🐛 버그신고