How to call disclaimer page on all media files in Drupal?
Here is an example

&lt;a class="test" href="https://bitcoin.org/bitcoin.pdf"&gt;bitcoin.pdf&lt;/a&gt;

&lt;script&gt;
    $('.test').click(function() {
    alert('Your disclamer goes here');
});
&lt;/script&gt;


SEE A DEMO HERE

In Drupal to use jQuery you need to wrap it in 

(function ($) {

    //code goes here

})(jQuery);


so your code should look like this

(function ($) {
  $( document ).ready(function() { 
    $('.test').click(function() {
        alert('your disclamer goes here');
    });
  });
})(jQuery);


PS: If your div class is outside the &lt;a&gt;

&lt;div class="test"&gt;&lt;a href="https://bitcoin.org/bitcoin.pdf"&gt;bitcoin.pdf&lt;/a&gt;&lt;/div&gt;


then use it like this

&lt;script&gt;
(function ($) {
  $( document ).ready(function() { 
    $('.test a').click(function() {
        alert('your disclamer goes here');
    });
  });
})(jQuery);
&lt;/script&gt;