欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!
  callbacks.fired()
  
  描述: 确定回调是否至少已经调用一次。
  
  添加的版本: 1.7callbacks.fired()
  
  这个方法不接受任何参数
  
  Example
  
  使用 callbacks.fired() 确定回调是否至少已经调用一次:
  
  // 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"
  
  callbacks.fire( "world" ); // outputs: "foo: world"
  
  // test to establish if the callbacks have been called
  
  console.log( callbacks.fired() );

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