jimboobrien
9/20/2017 - 10:42 PM

jquery.download-pdf-links.js

/**
 * Forces all PDF links to download automatically, if the browser supports it.  
 * Otherwise, open the link in a new browser window or tab.
 */
jQuery(document).ready(function($) {
   $('a[href$=".pdf"]')
        .attr('download', '')
        .attr('target', '_blank'); 
});