You can do the following, between the a
tags you can put the text inside a span
with an identifier (in case I put the class download) and use the code to click one at a time, the problem is that the browser asks permission to download all files at once.
<a href="http://www.petcidade.com.br/wp-content/uploads/2016/09/cachorro-tenta-pegar-petisco-imagem-1-reproducao.jpg" download="teste"><span class="download">teste1</span></a>
<script>
$('.download').trigger('click');
</script>
NOTE: The download attribute did not work for this link, but for a local file it worked on the test I did here!
Or you could do it this way here too:
$('a').each(function(i, el) {
window.location = $(el).prop('href');
});
That way you would not need to put the span
tag, but it would not have control by the download
attribute.