I recently created a website using HTML/CSS and JavaScript, and I incorporated a modal using Bootstrap 5. To add a unique touch, I used JavaScript to replace the standard "Save changes" button of Bootstrap with a random image inside the modal. However, I noticed that when the random image appears in the modal, the original image on the website disappears.
Has anyone encountered this issue before and found a solution to prevent the website image from disappearing while the random image is displayed in the modal?
I attempted to adjust the position and z-index of the website image in the CSS code, but unfortunately, the issue persisted.