e had a recurring problem when creating direct download link in a multimedia web that has been created which is responsive and is used mostly for mobile devices but now using direct download links always send me to where I have The content is stored or reproduced or visualized and tried with the download attribute that only works in the desktop browser but in mobile phones and not tried to use this javascript code and many others but none sent directly to the browser's download manager.
$ ('a [download]'). click (function (e) { $ (this) .preventDefault (); var downloadUrl = $ (this) .attr ('href'); setTimeout ("window.location.assign ('" + downloadUrl + "');", 0); });
please appreciate the easiest way possible if you have that knowledge.