How to add link to image with Javascript?
The question is very confusing. The author has already created an <img>
element, added attributes and appended it to another element, yet they're asking how to create an <a>
element, add attributes and do basically the same thing.
It's not exactly a duplicate; it's not exactly unsalvageable (at least as far as I'm reading the definition of that category). The comments are trying to be nice and help the author realize they're asking how to do the same thing they just posted code to do.
How should this be handled?