...it's often difficult to discern exactly what you're trying to achieve without a more precise description.
Well I don't think there's anything more precise (and succinct) than:
make checkbox 'A' swap images '1 & 2'... make checkbox 'B' swap images '3 & 4'... make checkbox 'C' swap images '5 & 6'.
-- from an earlier post (three replies above this one) which you must have missed.(and is a heck of lot neater than an elaborate 'school matron' analogy to express exactly the same thing).
...along with some code to use as a starting point.
The starting point code is shown at the top of this thread. It didn't seem necessary to keep displaying it. I had assumed that people who've followed this thread from the start would remember that it's there if they want to refer to it.
...all of your previous examples have only had a single <img> tag...
Of course there's only one <img> tag -- To swap back and forth between two images requires only the <img> tag for one of the images -- the other image is referenced from the script.
Both of my examples (at the top of this thread) are for a single image swap. The first example works, but it needed to be modified so that it could be adapted to doing multiple swaps (which meant adding some kind of linking so that each checkbox would affect their own designated images). The second example is that modified code for a single swap but it does not work. I needed to get it to work properly before adding more checkboxes and more image pairs -- my thought was that: if it can't do one swap, then it won't do two, or three. In other words, if I were to take your sample code -- which contains two flips (four images) and remove one image tag, one checkbox and remove the references of those two related images from the script, then I should be left with only one flip on the page -- but one that still works but mine didn't work. Anyway, I will test your sample code with the two flips.
One issue I see ahead is about this:
...this code depends on enclosing each checkbox and image pair in a <form> tag...
In this project the checkbox and the <img> tag will be far removed from each other in the layout of the page with many tags of different kinds between them and, if I can find a way to do it, the checkboxes and the images will lie in separate tables as well. Might there be a work-around to having to enclose the <img> within a checkbox <form>?