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,359
16년 전 조회 1,701
16년 전 조회 5,075
16년 전 조회 2,309
16년 전 조회 3,412
16년 전 조회 2,646
16년 전 조회 1,565
16년 전 조회 5,358
16년 전 조회 2,476
16년 전 조회 5,967
16년 전 조회 1,943
16년 전 조회 4,016
16년 전 조회 3,034
16년 전 조회 2,216
16년 전 조회 2,236
16년 전 조회 4,404
16년 전 조회 3,300
16년 전 조회 2,835
16년 전 조회 2,972
16년 전 조회 2,088
16년 전 조회 1,770
16년 전 조회 1,682
16년 전 조회 1,404
16년 전 조회 1,678
16년 전 조회 1,904
16년 전 조회 1,596
16년 전 조회 4,847
16년 전 조회 3,827
16년 전 조회 1,795
16년 전 조회 1,538
16년 전 조회 2,275
16년 전 조회 4,519
16년 전 조회 3,547
16년 전 조회 2,582
16년 전 조회 4,342
16년 전 조회 3,205
16년 전 조회 1,354
16년 전 조회 1,376
16년 전 조회 2,039
16년 전 조회 1,884
16년 전 조회 2,563
16년 전 조회 2,234
16년 전 조회 1,365
16년 전 조회 4,384
16년 전 조회 1,480
16년 전 조회 1,784
16년 전 조회 2,210
16년 전 조회 3,843
16년 전 조회 2,739
16년 전 조회 1,491
16년 전 조회 4,014
16년 전 조회 1,395
16년 전 조회 1,578
16년 전 조회 1,247
16년 전 조회 1,719
16년 전 조회 1,619
16년 전 조회 1,633
16년 전 조회 1,423
16년 전 조회 2,176
16년 전 조회 1,821
16년 전 조회 1,973
16년 전 조회 2,187
16년 전 조회 1,471
16년 전 조회 2,308
16년 전 조회 2,257
16년 전 조회 4,535
16년 전 조회 1,297
16년 전 조회 1,051
16년 전 조회 2,010
16년 전 조회 1,979
16년 전 조회 1,511
16년 전 조회 2,038
16년 전 조회 2,277
16년 전 조회 1,391
16년 전 조회 1,731
16년 전 조회 1,924
16년 전 조회 1,014
16년 전 조회 1,689
16년 전 조회 1,409
16년 전 조회 1,912
16년 전 조회 1,327
16년 전 조회 2,206
16년 전 조회 1,893
16년 전 조회 5,874
16년 전 조회 1,919
16년 전 조회 3,688
16년 전 조회 1,465
16년 전 조회 1,756
16년 전 조회 2,071
16년 전 조회 2,613
16년 전 조회 2,314
16년 전 조회 2,750
16년 전 조회 2,994
16년 전 조회 3,018
16년 전 조회 1,822
16년 전 조회 1,543
16년 전 조회 1,417
16년 전 조회 1,727
16년 전 조회 1,208
🐛 버그신고