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,356
16년 전 조회 1,348
16년 전 조회 1,695
16년 전 조회 5,064
16년 전 조회 2,299
16년 전 조회 3,406
16년 전 조회 2,638
16년 전 조회 1,557
16년 전 조회 5,351
16년 전 조회 2,465
16년 전 조회 5,958
16년 전 조회 1,934
16년 전 조회 4,009
16년 전 조회 3,025
16년 전 조회 2,210
16년 전 조회 2,229
16년 전 조회 4,403
16년 전 조회 3,289
16년 전 조회 2,827
16년 전 조회 2,962
16년 전 조회 2,079
16년 전 조회 1,765
16년 전 조회 1,675
16년 전 조회 1,398
16년 전 조회 1,668
16년 전 조회 1,897
16년 전 조회 1,588
16년 전 조회 4,837
16년 전 조회 3,819
16년 전 조회 1,785
16년 전 조회 1,529
16년 전 조회 2,268
16년 전 조회 4,511
16년 전 조회 3,537
16년 전 조회 2,575
16년 전 조회 4,333
16년 전 조회 3,202
16년 전 조회 1,349
16년 전 조회 1,368
16년 전 조회 2,032
16년 전 조회 1,879
16년 전 조회 2,555
16년 전 조회 2,226
16년 전 조회 1,357
16년 전 조회 4,377
16년 전 조회 1,473
16년 전 조회 1,778
16년 전 조회 2,200
16년 전 조회 3,834
16년 전 조회 2,730
16년 전 조회 1,484
16년 전 조회 4,007
16년 전 조회 1,390
16년 전 조회 1,574
16년 전 조회 1,239
16년 전 조회 1,711
16년 전 조회 1,610
16년 전 조회 1,627
16년 전 조회 1,417
16년 전 조회 2,171
16년 전 조회 1,812
16년 전 조회 1,965
16년 전 조회 2,176
16년 전 조회 1,464
16년 전 조회 2,299
16년 전 조회 2,249
16년 전 조회 4,525
16년 전 조회 1,286
16년 전 조회 1,043
16년 전 조회 2,002
16년 전 조회 1,970
16년 전 조회 1,503
16년 전 조회 2,030
16년 전 조회 2,268
16년 전 조회 1,384
16년 전 조회 1,723
16년 전 조회 1,915
16년 전 조회 1,001
16년 전 조회 1,685
16년 전 조회 1,401
16년 전 조회 1,902
16년 전 조회 1,317
16년 전 조회 2,200
16년 전 조회 1,885
16년 전 조회 5,864
16년 전 조회 1,912
16년 전 조회 3,677
16년 전 조회 1,461
16년 전 조회 1,750
16년 전 조회 2,065
16년 전 조회 2,603
16년 전 조회 2,303
16년 전 조회 2,746
16년 전 조회 2,983
16년 전 조회 3,010
16년 전 조회 1,815
16년 전 조회 1,535
16년 전 조회 1,408
16년 전 조회 1,720
16년 전 조회 1,203
🐛 버그신고