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,365
16년 전 조회 1,355
16년 전 조회 1,698
16년 전 조회 5,073
16년 전 조회 2,304
16년 전 조회 3,411
16년 전 조회 2,646
16년 전 조회 1,561
16년 전 조회 5,355
16년 전 조회 2,474
16년 전 조회 5,964
16년 전 조회 1,942
16년 전 조회 4,015
16년 전 조회 3,033
16년 전 조회 2,215
16년 전 조회 2,235
16년 전 조회 4,403
16년 전 조회 3,297
16년 전 조회 2,832
16년 전 조회 2,969
16년 전 조회 2,085
16년 전 조회 1,769
16년 전 조회 1,681
16년 전 조회 1,404
16년 전 조회 1,673
16년 전 조회 1,902
16년 전 조회 1,594
16년 전 조회 4,843
16년 전 조회 3,825
16년 전 조회 1,792
16년 전 조회 1,537
16년 전 조회 2,274
16년 전 조회 4,517
16년 전 조회 3,544
16년 전 조회 2,580
16년 전 조회 4,341
16년 전 조회 3,204
16년 전 조회 1,353
16년 전 조회 1,376
16년 전 조회 2,038
16년 전 조회 1,883
16년 전 조회 2,560
16년 전 조회 2,231
16년 전 조회 1,360
16년 전 조회 4,381
16년 전 조회 1,479
16년 전 조회 1,783
16년 전 조회 2,208
16년 전 조회 3,841
16년 전 조회 2,736
16년 전 조회 1,489
16년 전 조회 4,013
16년 전 조회 1,394
16년 전 조회 1,577
16년 전 조회 1,246
16년 전 조회 1,718
16년 전 조회 1,617
16년 전 조회 1,631
16년 전 조회 1,420
16년 전 조회 2,176
16년 전 조회 1,818
16년 전 조회 1,973
16년 전 조회 2,184
16년 전 조회 1,470
16년 전 조회 2,308
16년 전 조회 2,257
16년 전 조회 4,532
16년 전 조회 1,294
16년 전 조회 1,051
16년 전 조회 2,009
16년 전 조회 1,979
16년 전 조회 1,508
16년 전 조회 2,036
16년 전 조회 2,275
16년 전 조회 1,389
16년 전 조회 1,730
16년 전 조회 1,923
16년 전 조회 1,009
16년 전 조회 1,688
16년 전 조회 1,407
16년 전 조회 1,910
16년 전 조회 1,326
16년 전 조회 2,206
16년 전 조회 1,891
16년 전 조회 5,871
16년 전 조회 1,918
16년 전 조회 3,686
16년 전 조회 1,465
16년 전 조회 1,755
16년 전 조회 2,071
16년 전 조회 2,611
16년 전 조회 2,310
16년 전 조회 2,750
16년 전 조회 2,992
16년 전 조회 3,016
16년 전 조회 1,821
16년 전 조회 1,541
16년 전 조회 1,413
16년 전 조회 1,725
16년 전 조회 1,207
🐛 버그신고