欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!
您的位置:DIVCSS5首页 > HTML >
  callbacks.remove( callbacks )
  
  描述: 从回调列表中的删除一个回调或回调集合。
  
  添加的版本: 1.7callbacks.remove( callbacks )
  
  callbacks
  
  类型: Function, Array
  
  从回调列表中删除的一个函数,或者函数数组。
  
  此方法返回绑定它的那个回调对象 (this).
  
  例子:
  
  使用 callbacks.remove() 从回调列表中的删除回调:
  
  // a sample logging function to be added to a callbacks list
  
  var foo = function( value ) {
  
  console.log( "foo: " + value );
  
  };
  
  var callbacks = $.Callbacks();
  
  // add the function "foo" to the list
  
  callbacks.add( foo );
  
  // fire the items on the list
  
  callbacks.fire( "hello" );
  
  // outputs: "foo: hello"
  
  // remove "foo" from the callback list
  
  callbacks.remove( foo );
  
  // fire the items on the list again
  
  callbacks.fire( "world" );
  
  // nothing output as "foo" is no longer in the list

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/html/h64041.shtml

如对文章有任何疑问请提交到DIV CSS论坛,或有任何网页制作CSS问题立即到CSS论坛发贴求解 或 直接DIVCSS5网页顶部搜索遇到DIVCSS疑问。
CSS教程文章修订日期:2018-08-14 17:37 原创:DIVCSS5
本文www.divcss5.com DIVCSS5版权所有。