Run Jquery First And Then Download Files When Link Clicked
I have a link which has direct file download URL in it. So when a user click on the link, that file downloads. Here is the link: preventDefault();
$('a.download-video').click(function(event) {
var href = this.href;
//My JS Codealert(href);
});
<scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><aclass="download-video"href="https://www.w3schools.com/html/mov_bbb.mp4?file=1&name=A Video"download> Download</a>
Here's a link for browser compatibility.
Post a Comment for "Run Jquery First And Then Download Files When Link Clicked"