Fetch the repository succeeded.
delaycall.js 是一个 jQuery / Zepto 插件,用于在用户完成某项操作后,延迟指定秒数后自动调动指定函数。如用户输入完内容后,延迟1秒,自动提交表单。
delaycall.js is a jQuery / Zepto plug-in, for the user to complete an operation, the number of seconds after the specified number of seconds automatically adjust the specified function. If the user input after the end of the content, delay one second, automatically submit the form.
https://github.com/yzchen0o0/delaycall
http://git.oschina.net/cyzshenzhen/delaycall
点击查看在线演示地址
Click to view online demo
<script src="./jquery-1.11.3.js"></script>
<script src="./delaycall.js"></script>
function foo() {
alert('保存成功!');
}
$(function() {
$('input').delaycall({
'func': foo, // 必填,函数名称
'times': 1000, // 选填,延迟时间,单位:毫秒
'beforeCallClear': true, // 选填,未执行func前,绑定事件被触发,是否清理之前定义的定时器
'event': 'blur', // 选填,触发事件,默认是离开焦点时触发,依据jquery/zepto语法,如 keydown ...
'justNormalKeyCode': true // 选填,event -> keydown 时,是否只支持普通按键:英文、数字
});
});
修改标题:<input id="s1"/> 修改内容:<input id="s2"/>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. Open source ecosystem
2. Collaboration, People, Software
3. Evaluation model