jQuery callbacks.locked() 方法

jQuery 教程 · 2019-03-29 17:57:43

实例

使用 callbacks.disabled() 确定回调列表是否已被锁定

$(function () { // 简单的测试函数 var foo = function( value ) { alert( "foo:" + value ); }; var callbacks = $.Callbacks(); // 添加测试函数foo到列表 callbacks.add( foo ); // 传入参数调用所有回调 callbacks.fire( "hello" ); // 输出 "foo: hello" // 锁定回调列表 callbacks.lock(); // 测试回调列表的状态 alert( callbacks.locked() ); // true })

定义和用法

callbacks.locked() 函数用于判断回调列表是否已被锁定。

语法

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

callbacks.locked()

点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html

查看所有标签

AI Algorithms, Data Structures, and Idioms in Prolog, Lisp, and

AI Algorithms, Data Structures, and Idioms in Prolog, Lisp, and

George F. Luger、William A Stubblefield / Addison Wesley / 2008-09-04 / USD 22.20

This book is designed for three primary purposes. The first is as a programming language component of a general class in Artificial Intelligence. From this viewpoint, the authors see as essential that......一起来看看 《AI Algorithms, Data Structures, and Idioms in Prolog, Lisp, and 》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具