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,362
16년 전 조회 1,350
16년 전 조회 1,697
16년 전 조회 5,071
16년 전 조회 2,303
16년 전 조회 3,408
16년 전 조회 2,643
16년 전 조회 1,558
16년 전 조회 5,354
16년 전 조회 2,472
16년 전 조회 5,961
16년 전 조회 1,939
16년 전 조회 4,013
16년 전 조회 3,031
16년 전 조회 2,214
16년 전 조회 2,234
16년 전 조회 4,403
16년 전 조회 3,295
16년 전 조회 2,828
16년 전 조회 2,968
16년 전 조회 2,083
16년 전 조회 1,769
16년 전 조회 1,679
16년 전 조회 1,404
16년 전 조회 1,672
16년 전 조회 1,901
16년 전 조회 1,590
16년 전 조회 4,840
16년 전 조회 3,821
16년 전 조회 1,791
16년 전 조회 1,532
16년 전 조회 2,272
16년 전 조회 4,514
16년 전 조회 3,542
16년 전 조회 2,580
16년 전 조회 4,339
16년 전 조회 3,203
16년 전 조회 1,352
16년 전 조회 1,373
16년 전 조회 2,037
16년 전 조회 1,882
16년 전 조회 2,559
16년 전 조회 2,230
16년 전 조회 1,359
16년 전 조회 4,379
16년 전 조회 1,478
16년 전 조회 1,780
16년 전 조회 2,205
16년 전 조회 3,839
16년 전 조회 2,734
16년 전 조회 1,487
16년 전 조회 4,011
16년 전 조회 1,394
16년 전 조회 1,577
16년 전 조회 1,242
16년 전 조회 1,716
16년 전 조회 1,614
16년 전 조회 1,630
16년 전 조회 1,420
16년 전 조회 2,174
16년 전 조회 1,816
16년 전 조회 1,969
16년 전 조회 2,181
16년 전 조회 1,468
16년 전 조회 2,303
16년 전 조회 2,255
16년 전 조회 4,531
16년 전 조회 1,292
16년 전 조회 1,047
16년 전 조회 2,008
16년 전 조회 1,975
16년 전 조회 1,505
16년 전 조회 2,033
16년 전 조회 2,272
16년 전 조회 1,385
16년 전 조회 1,727
16년 전 조회 1,921
16년 전 조회 1,008
16년 전 조회 1,687
16년 전 조회 1,406
16년 전 조회 1,906
16년 전 조회 1,324
16년 전 조회 2,201
16년 전 조회 1,887
16년 전 조회 5,869
16년 전 조회 1,914
16년 전 조회 3,683
16년 전 조회 1,465
16년 전 조회 1,751
16년 전 조회 2,068
16년 전 조회 2,609
16년 전 조회 2,308
16년 전 조회 2,749
16년 전 조회 2,989
16년 전 조회 3,013
16년 전 조회 1,820
16년 전 조회 1,538
16년 전 조회 1,412
16년 전 조회 1,722
16년 전 조회 1,205
🐛 버그신고