제이쿼리 callbacks.disable () 정보
jQuery 제이쿼리 callbacks.disable ()본문
제이쿼리 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
추천
0
0
댓글 0개