您当前的位置:首页 > 网站建设 > jQuery
| php | asp | css | H5 | javascript | Mysql | Dreamweaver | Delphi | 网站维护 | 帝国cms | React | 考试系统 | ajax | jQuery |

jQuery callbacks.disable() 方法

51自学网 2023-01-08 20:05:48
  jQuery

实例

禁用回调函数列表中的回调

$(function () { // 一个将被添加到列表的简单的函数 var foo = function( value ) { alert( value ); }; var callbacks = $.Callbacks(); // 添加上面的函数到回调列表 callbacks.add( foo ); // 传入参数调用所有回调列表函数 callbacks.fire( "foo" ); // 输出: foo // 禁用回调函数 callbacks.disable(); // 尝试用 "foobar" 作为参数 callbacks.fire( "foobar" ); // foobar 不会被输出})

定义和用法

callbacks.disable() 函数用于禁用回调列表中的回调。

提示:此方法返回一个回调对象到它绑定的回调列表。

语法

这个方法不接受任何参数。

callbacks.disable()


下载地址:
jQuery callbacks.add() 方法
jQuery callbacks.disabled() 方法
51自学网,即我要自学网,自学EXCEL、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。
京ICP备13026421号-1