I have created a website in HTML that uses a number of photo "slide shows" where the visitor can click through a set of photos using "next" and "previous" buttons. The photos are called from a php file. I want to add an "onClick" function to some of the photos so that when the visitor clicks a photo it is replaced by a new photo (for example, one photo shows a group of people, if the visitor clicks the photo then it is replaced by a close-up of one person from that photo). This new photo should appear in the same place in the slide show. I think this can be done with javascript. I basically just need this done once then if I need to add this function somewhere else on the site I can use the code. I will attach one of the relevant files and will send more information if we work together. Thank you.
Thank you.