This finds all of the links pointing to PDF files and opens them in a new window. If you are using Chrome, you will need to enable popups for this to work.
$("a[href$='.pdf']").each(function () { window.open($(this).attr('href'),"_blank"); });
This finds all of the links pointing to PDF files and opens them in a new window. If you are using Chrome, you will need to enable popups for this to work.
$("a[href$='.pdf']").each(function () { window.open($(this).attr('href'),"_blank"); });
Tags: Web Development
Originally published on December 5th, 2019, updated on