What is wrong with my code?
I tried doing the challenge on my own but it didn't work, upon seeing how treasure did it, my code seems same but still not working. I am using chrome.
const pdf = $('a[href$=".pdf"]'); pdf.attr("download",true);
Richard Eldridge8,224 Points
According to caniuse.com, the download attribute is supported; however, it is "ignored" on cross-origin links on the newest versions of Chrome. I believe that is the source of the problem. I am having the same issue.
Edit: Alan M. posted a solution on a different post that worked for me.
Steven Parker176,634 Points
There's nothing obvious in this little snippet, perhaps the problem is elsewhere. You can share your entire environment if you make a snapshot of your workspace and post the link to it here.
Also, when you say "not working", exactly what are you doing and what do you expect to happen?