I've been trying to simulate click on a tag and this is not working as i need it to. my anchor tag looks like this
<a href="/dl/pic.jpg" target="_blank" download="file.jpg"> Download this pic </a>
a normral $("a").click()
or trigger('click')
wont work here.Any ideas?
EDIT
I need to trigger a click on this Anchor tag and causing the file to download, i dont need to add another onClick function.