Swap BG gradient images in a gallery of swatches
问题 I am finishing a function to edit swatches in a grid,and am at the point where small image needs to be swapped with the main image to edit/alter if required, the current code gets the individual image, but not swap it with the main image. I have used .src, but this doesn't seem to be right for a gradient background image, should I use backgroundImage?. Code is below, and works until the swap, which doesnt. The mainID id is the large div at the top of the page "bodybg", where the swatch was