Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andycall/ajaxqueue
基于jquery的Ajax请求队列
https://github.com/andycall/ajaxqueue
Last synced: 6 days ago
JSON representation
基于jquery的Ajax请求队列
- Host: GitHub
- URL: https://github.com/andycall/ajaxqueue
- Owner: andycall
- Created: 2014-08-12T18:13:54.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-15T16:39:02.000Z (almost 10 years ago)
- Last Synced: 2024-10-19T04:31:12.208Z (2 months ago)
- Language: JavaScript
- Size: 156 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ajaxQueue
=========基于jquery的Ajax请求队列
用于处理优先ajax与一般ajax请求## 用法
var handler = AjaxQueue.setup(), // 实例化队列对象
priority = 0; // 优先级为0是普通请求,1为高级请求。 高级请求会优先发送
// 向队列中添加请求对象即可发送请求
handler.pushRequest({
url: "" , // 发送的地址
type : "", // 提交类型
complete : function(data){} //请求成功之后的回调函数
}, priority);