pdf file opens, instead of downloads
I've looked through the answers for similar questions, but those solutions don't seem to work for me. My code seems good. I even double-checked that the download attribute was being attached to the link in DevTools, but every time I click the link, it just opens the pdf file.
Maybe I'm just missing something? I'm not sure. Here's my code, if anyone could let me know if there's something I'm just not getting? Any and all suggestions are greatly appreciated.
const $odd = $('a:odd'); const $secureLinks = $('a[href^="https://"]'); const $pdfs = $('a[href$=".pdf"]');
$secureLinks.attr('target', '_blank').addClass('secure'); $pdfs.attr('download', true).addClass('pdf');