Multiple File Upload plugin for jQuery and Cancel button - November 20th, 2008
QuocKien here ask me to help him with Multiple File Upload plugin and cancel button
This the most easy way I think
it’s this simple js code (cancel button will work for second multi input file)
$(document).ready(function(){
$(’.multi’).MultiFile();
$(’.multi2′).MultiFile();
$("#cancel_but").click(function() {
$(".multi2").parent().find(’span a’).each(function() {
$(this).click();
});
})
});
where is .multi2 - it’s selector of your multi file input
simple html
<input type="file" class="multi" />
<input type="file" class="multi2" /><input type="button" value="cancel" id="cancel_but" />
I hope this help
Tags: jQuery, multi input file
November 21st, 2008 at 5:53 am
Hi,
Thanks millions for your help. It works great and very surprised that the code is short. Thanks again.
Cheers.
Kien