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,358
16년 전 조회 1,350
16년 전 조회 1,696
16년 전 조회 5,067
16년 전 조회 2,301
16년 전 조회 3,408
16년 전 조회 2,639
16년 전 조회 1,557
16년 전 조회 5,354
16년 전 조회 2,466
16년 전 조회 5,960
16년 전 조회 1,937
16년 전 조회 4,011
16년 전 조회 3,026
16년 전 조회 2,211
16년 전 조회 2,232
16년 전 조회 4,403
16년 전 조회 3,292
16년 전 조회 2,827
16년 전 조회 2,966
16년 전 조회 2,081
16년 전 조회 1,766
16년 전 조회 1,678
16년 전 조회 1,399
16년 전 조회 1,669
16년 전 조회 1,900
16년 전 조회 1,590
16년 전 조회 4,839
16년 전 조회 3,821
16년 전 조회 1,789
16년 전 조회 1,532
16년 전 조회 2,271
16년 전 조회 4,513
16년 전 조회 3,539
16년 전 조회 2,578
16년 전 조회 4,336
16년 전 조회 3,202
16년 전 조회 1,352
16년 전 조회 1,369
16년 전 조회 2,033
16년 전 조회 1,879
16년 전 조회 2,558
16년 전 조회 2,228
16년 전 조회 1,359
16년 전 조회 4,377
16년 전 조회 1,475
16년 전 조회 1,780
16년 전 조회 2,201
16년 전 조회 3,836
16년 전 조회 2,732
16년 전 조회 1,485
16년 전 조회 4,010
16년 전 조회 1,393
16년 전 조회 1,576
16년 전 조회 1,241
16년 전 조회 1,714
16년 전 조회 1,612
16년 전 조회 1,628
16년 전 조회 1,417
16년 전 조회 2,174
16년 전 조회 1,813
16년 전 조회 1,969
16년 전 조회 2,178
16년 전 조회 1,466
16년 전 조회 2,302
16년 전 조회 2,253
16년 전 조회 4,530
16년 전 조회 1,290
16년 전 조회 1,044
16년 전 조회 2,003
16년 전 조회 1,973
16년 전 조회 1,504
16년 전 조회 2,031
16년 전 조회 2,269
16년 전 조회 1,385
16년 전 조회 1,725
16년 전 조회 1,919
16년 전 조회 1,006
16년 전 조회 1,686
16년 전 조회 1,404
16년 전 조회 1,902
16년 전 조회 1,320
16년 전 조회 2,201
16년 전 조회 1,885
16년 전 조회 5,867
16년 전 조회 1,912
16년 전 조회 3,678
16년 전 조회 1,465
16년 전 조회 1,751
16년 전 조회 2,068
16년 전 조회 2,604
16년 전 조회 2,306
16년 전 조회 2,747
16년 전 조회 2,983
16년 전 조회 3,011
16년 전 조회 1,818
16년 전 조회 1,537
16년 전 조회 1,411
16년 전 조회 1,722
16년 전 조회 1,204
🐛 버그신고