Jquery how to trigger file download

Download file when clicking on the link (instead of navigating to the file): The download attribute specifies that the target will be downloaded when a user 

Have you ever wanted to have a link to a resource, such as a PDF file, and have that resource be automatically downloaded when the link is clicked? All you  31 May 2016 It is possible to programmatically open a file dialog in JavaScript, but In essence, it boils down to triggering a click event on a hidden