jQuery plugin multiple files simultaneous download.
npm install jquery-multidownload`` html`
Add to your project
` bash`
npm install jquery-multidownload
and load with require
` javascript`
global.jQuery = require('jquery')
require('jquery-multidownload')
Select links to resources you want to download simultaneously and call multiDownload function:
` html
document 1
document 2
document 3
$('#download_all').click(function (event) {
event.preventDefault();
$('.document').multiDownload();
});
`
_Important_: All $('.my_links') elements must have defined "href" attribute.
"href" must point to documents that generate proper HTML headers ("Content-Disposition: attachment; filename=my_filename").
Set custom delay between downloads that are triggered (might be useful on IE):
` javascript``
$('.my_download_trigger').multiDownload({ delay: 500 });
Please run spec/runner.html to check if old API still works and add specs for new code.