JQuery learning(6):JQuery callback function
来源:互联网 发布:whois数据库 编辑:程序博客网 时间:2024/05/22 12:55
The callback function execution after current animation finishing 100%.
JQuery animation issue
A lot of functions of jQuery refer to animation
These functions may be will the speed or duration as optional parameter.
Example:$("p").hide("slow")
The parameters both speed and duration can be setting many different values, such as "slow", "fast", "normal" or millisecond。
Example
$("button").click(function(){$("p").hide(1000);});
Because of javascript sentence execute line-by-line,After the animation sentence may be generate a error or conflict of page, for the animation not done.
In order to avoid this case,you can add the callback function as parameters.
JQuery callback functions
After animation finish percent 100, invoke the callback function at once.
The typical syntax:
$(selector).hide(speed,callback)
The callback parameter is a function of be executed after the hide.
Error:(Without callback)
$("p").hide(1000);alert("The paragraph is now hidden");
Right:(There is callback)
$("p").hide(1000,function(){alert("The paragraph is now hidden");});
- JQuery learning(6):JQuery callback function
- jQuery( callback )
- Understanding this, $(this), and event in a JQuery callback function
- learning jQuery 学习笔记十五(+jQuery 1.4.1 API)-- AJAX----load(url, [data], [callback])
- 【jQuery 教程】jQuery Callback 函数
- jQuery核心函数-jQuery(callback)
- jQuery 核心函数:jQuery(callback)
- jQuery:CallBack 的解释
- JQuery Callback and Functions
- jQuery中Callback函数
- jQuery Callback 函数
- jQuery Callback 函数
- jQuery Callback 函数
- 10. jQuery Callback 函数
- 10011---jQuery--Callback&Chaining
- jQuery Stop/Callback/Chaining
- jQuery Callback 函数
- jQuery Callback 方法
- 使用SQLWarning20.27.10.Using SQLWarning
- How do I monitor HTTP communication in Eclipse?
- char* 赋值时单引号和双引号的区别?include”“和include<>的区别
- 在Windows下使用命令提示符以及VS提供的CL编译器编译运行C/C++
- opencv 数组与数相乘函数为cvCvtScale()
- JQuery learning(6):JQuery callback function
- Python的时间:秒和字符串之间的转换
- 4. OpenGL综合知识 --- 窗口系统Windows和Linux/X
- C# 向一个DataTable内插入另一个DataTable的行,error“该行已属于另一个表”
- float与double的范围和精度
- 图像格式之--YUV
- js parseInt的陷阱分析小结
- Oracle 11g: How to add/enable/disable/drop a constraint
- 发现一个比较全的处理date格式js类库