I need a solution to duplicate the code of an element and transfer it to another element without removing it from its original position.
Currently, I have a JavaScript function that allows you to move a picture to a box when it's clicked. However, the picture is fully transferred to the box. I would like the picture to remain in its original place while being copied to the box, so I can gray it out instead of making it disappear.
I'm not looking for a specific answer, just a general JavaScript solution on how to achieve this. Thank you!