Replace image src and a href onclick
问题 I've got this little project where I want to swap an image for another, and display the new image in a lightbox. The code below works as follows; when I click one of the small images, the image src of the large image is replaced with the src of the small image. However, when I click the large image, it still opens the default large image in my lightbox. Is there any way I can make the hyperlink href get swapped the same way the image src is swapped? They need to get the same value. The