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,700
16년 전 조회 5,075
16년 전 조회 2,308
16년 전 조회 3,412
16년 전 조회 2,646
16년 전 조회 1,564
16년 전 조회 5,358
16년 전 조회 2,476
16년 전 조회 5,966
16년 전 조회 1,943
16년 전 조회 4,016
16년 전 조회 3,034
16년 전 조회 2,215
16년 전 조회 2,236
16년 전 조회 4,404
16년 전 조회 3,298
16년 전 조회 2,833
16년 전 조회 2,971
16년 전 조회 2,085
16년 전 조회 1,770
16년 전 조회 1,682
16년 전 조회 1,404
16년 전 조회 1,675
16년 전 조회 1,904
16년 전 조회 1,595
16년 전 조회 4,846
16년 전 조회 3,826
16년 전 조회 1,794
16년 전 조회 1,538
16년 전 조회 2,274
16년 전 조회 4,518
16년 전 조회 3,546
16년 전 조회 2,582
16년 전 조회 4,341
16년 전 조회 3,205
16년 전 조회 1,353
16년 전 조회 1,376
16년 전 조회 2,039
16년 전 조회 1,883
16년 전 조회 2,561
16년 전 조회 2,232
16년 전 조회 1,365
16년 전 조회 4,383
16년 전 조회 1,479
16년 전 조회 1,784
16년 전 조회 2,210
16년 전 조회 3,843
16년 전 조회 2,738
16년 전 조회 1,491
16년 전 조회 4,014
16년 전 조회 1,395
16년 전 조회 1,577
16년 전 조회 1,246
16년 전 조회 1,719
16년 전 조회 1,619
16년 전 조회 1,631
16년 전 조회 1,422
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,296
16년 전 조회 1,051
16년 전 조회 2,009
16년 전 조회 1,979
16년 전 조회 1,510
16년 전 조회 2,038
16년 전 조회 2,277
16년 전 조회 1,391
16년 전 조회 1,730
16년 전 조회 1,924
16년 전 조회 1,013
16년 전 조회 1,689
16년 전 조회 1,409
16년 전 조회 1,912
16년 전 조회 1,327
16년 전 조회 2,206
16년 전 조회 1,893
16년 전 조회 5,871
16년 전 조회 1,919
16년 전 조회 3,687
16년 전 조회 1,465
16년 전 조회 1,756
16년 전 조회 2,071
16년 전 조회 2,612
16년 전 조회 2,311
16년 전 조회 2,750
16년 전 조회 2,994
16년 전 조회 3,018
16년 전 조회 1,821
16년 전 조회 1,543
16년 전 조회 1,415
16년 전 조회 1,726
16년 전 조회 1,208
🐛 버그신고