제이쿼리 callbacks.disable ()

· 8년 전 · 1672

제이쿼리 callbacks.disable ()


설명 : 콜백 목록에서 더 이상 아무것도 수행하지 못하게하십시오.


이 메서드는 그것이 첨부 된 Callbacks 개체를 반환합니다 ( this).


예:

사용 callbacks.disable()콜백 목록에 추가 호출을 사용하지 :


// A sample logging function to be added to a callbacks list

var foo = function( value ) {

  console.log( value );

};

 

var callbacks = $.Callbacks();

 

// Add the above function to the list

callbacks.add( foo );

 

// Fire the items on the list

callbacks.fire( "foo" );

// Outputs: foo

 

// Disable further calls being possible

callbacks.disable();

 

// Attempt to fire with "foobar" as an argument

callbacks.fire( "foobar" );

// foobar isn't output

|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

개발자팁

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
jQuery 8년 전 조회 1,929
jQuery 8년 전 조회 1,676
jQuery 8년 전 조회 1,952
jQuery 8년 전 조회 2,019
jQuery 8년 전 조회 1,637
jQuery 8년 전 조회 1,654
jQuery 8년 전 조회 1,605
jQuery 8년 전 조회 1,282
jQuery 8년 전 조회 1,446
jQuery 8년 전 조회 1,474
jQuery 8년 전 조회 1,391
jQuery 8년 전 조회 2,282
jQuery 8년 전 조회 1,769
PHP 8년 전 조회 3,798
jQuery 8년 전 조회 1,673
jQuery 8년 전 조회 1,956
jQuery 8년 전 조회 1,806
jQuery 8년 전 조회 1,559
jQuery 8년 전 조회 2,227
jQuery 8년 전 조회 1,760
jQuery 8년 전 조회 2,079
jQuery 8년 전 조회 1,868
jQuery 8년 전 조회 2,103
jQuery 8년 전 조회 1,792
jQuery 8년 전 조회 1,571
jQuery 8년 전 조회 1,384
jQuery 8년 전 조회 1,809
jQuery 8년 전 조회 2,436
jQuery 8년 전 조회 1,445
jQuery 8년 전 조회 1,854
🐛 버그신고