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,359
16년 전 조회 1,350
16년 전 조회 1,696
16년 전 조회 5,068
16년 전 조회 2,303
16년 전 조회 3,408
16년 전 조회 2,642
16년 전 조회 1,558
16년 전 조회 5,354
16년 전 조회 2,468
16년 전 조회 5,960
16년 전 조회 1,937
16년 전 조회 4,011
16년 전 조회 3,027
16년 전 조회 2,213
16년 전 조회 2,232
16년 전 조회 4,403
16년 전 조회 3,292
16년 전 조회 2,828
16년 전 조회 2,967
16년 전 조회 2,082
16년 전 조회 1,766
16년 전 조회 1,678
16년 전 조회 1,400
16년 전 조회 1,669
16년 전 조회 1,900
16년 전 조회 1,590
16년 전 조회 4,839
16년 전 조회 3,821
16년 전 조회 1,790
16년 전 조회 1,532
16년 전 조회 2,272
16년 전 조회 4,514
16년 전 조회 3,539
16년 전 조회 2,578
16년 전 조회 4,336
16년 전 조회 3,203
16년 전 조회 1,352
16년 전 조회 1,371
16년 전 조회 2,034
16년 전 조회 1,881
16년 전 조회 2,558
16년 전 조회 2,230
16년 전 조회 1,359
16년 전 조회 4,378
16년 전 조회 1,478
16년 전 조회 1,780
16년 전 조회 2,204
16년 전 조회 3,836
16년 전 조회 2,733
16년 전 조회 1,486
16년 전 조회 4,010
16년 전 조회 1,393
16년 전 조회 1,577
16년 전 조회 1,242
16년 전 조회 1,716
16년 전 조회 1,613
16년 전 조회 1,628
16년 전 조회 1,417
16년 전 조회 2,174
16년 전 조회 1,813
16년 전 조회 1,969
16년 전 조회 2,179
16년 전 조회 1,467
16년 전 조회 2,303
16년 전 조회 2,253
16년 전 조회 4,530
16년 전 조회 1,290
16년 전 조회 1,045
16년 전 조회 2,003
16년 전 조회 1,975
16년 전 조회 1,504
16년 전 조회 2,032
16년 전 조회 2,270
16년 전 조회 1,385
16년 전 조회 1,725
16년 전 조회 1,920
16년 전 조회 1,007
16년 전 조회 1,686
16년 전 조회 1,404
16년 전 조회 1,903
16년 전 조회 1,322
16년 전 조회 2,201
16년 전 조회 1,886
16년 전 조회 5,868
16년 전 조회 1,913
16년 전 조회 3,679
16년 전 조회 1,465
16년 전 조회 1,751
16년 전 조회 2,068
16년 전 조회 2,606
16년 전 조회 2,308
16년 전 조회 2,749
16년 전 조회 2,985
16년 전 조회 3,011
16년 전 조회 1,819
16년 전 조회 1,538
16년 전 조회 1,412
16년 전 조회 1,722
16년 전 조회 1,205
🐛 버그신고