jQuery文件上传-上传完成后从队列中隐藏文件
Blueimp jQuery File Upload - hide file from queue after upload done responce
我使用的是Blueimp jQuery文件上传插件,我的配置是:
$('#fileupload').fileupload({
// Uncomment the following to send cross-domain cookies:
//xhrFields: {withCredentials: true},
url: 'assets/plugins/jquery-file-upload/server/php/',
done: function (e, data) {
//some code
}
});
当一个文件上传完成后,我需要在done:
事件列表中隐藏该文件,但我无法在队列列表中获得该文件的索引。
任何想法?
找到解决我问题的方法了
jQuery Fileupload
返回done
事件的数据,其中包含每个上传线程的context
参数,这与DOM元素相关,可用于任何操作,如隐藏在我的情况下:
$('#fileupload').fileupload({
// Uncomment the following to send cross-domain cookies:
//xhrFields: {withCredentials: true},
url: 'assets/plugins/jquery-file-upload/server/php/',
done: function(e, data) {
//hide completed upload element in queue
$(data.context['0']).fadeOut(700);
//here isoutput of uploaded objects
console.log(data.result);
}
});
相关文章:
- HTML5要求隐藏文件字段-反馈位置
- 将多个值保存到隐藏文件
- 单击跨度内的隐藏文件输入会导致RangeError
- 如何在Fine Uploader中隐藏文件扩展名
- 如何在asp.net的代码隐藏文件中显示对话框
- 读取隐藏文件
- 从代码隐藏文件 Aspx.cs 中检索 Javascript 中的会话值
- 在拖放UI中上传Selenium隐藏文件
- 隐藏文件上传浏览按钮的文本框
- 如何从 id 获取值到 c# 代码隐藏文件
- 通过使用Maven从Jetty隐藏文件来过滤JavaScript文件
- 如何将javascript中的JSON数组传递到我的代码隐藏文件
- 我无法访问<asp:textbox>代码隐藏文件中的值
- jQuery文件上传-上传完成后从队列中隐藏文件
- 隐藏文件输入后的选择
- 隐藏文件扩展名
- 点击隐藏文件输入jQuery错误
- Jquery更改方法触发隐藏文件输入
- ASP.NET代码隐藏文件在哪里执行?(客户端或服务器)
- 通过 Javascript 设置时无法访问代码隐藏文件中的标签文本