Programmatically change order of Pro Gallery images when any image is clicked

Greetings Fellow Sufferers,

I have a Pro Gallery that has 15 images set to open in expand mode. Image #8 is dead center of the gallery when it is collapsed. When the gallery is in expand mode, I need the following to happen:
Image 8 is stored in a temp field
9 moves to position 8
10 moves to position 9
11 moves to position 10
12 moves to position 11
13 moves to position 12
14 moves to position 13
and the temp field gets moved to position 14. (Message I need in this position for emphasis)
When expand mode is closed, I need everything to go back to its original state and position.

I used a Sub Gallery, but the transition wasn’t smooth enough from page to page and I also couldn’t get the sub gallery to open in expand mode.

Is there a way for me to switch galleries (on the same page or not) and open the gallery with the desired image layout in expand mode, and then return to the original pro gallery when it is closed?

Any ideas would be greatly appreciated.

Thank you

Hi there :wave:t2: It’s sort of hard to tell what you are trying to do (maybe some screenshots would help?), but I think you could get the functionality you want if you used a repeater rather than a gallery. You could create a database with your images, set the repeater item backgrounds to be the images, and you could have a lot of control over what shows or doesn’t show using filter and query on click of an item .
Good luck!

I found what I was doing wrong.
One line read: “type” : “text” instead of “type” : “image”

I was trying to rearrange the images from:

Normal View

Expand Mode

Thank you

@lmeyer would you by any chance know how to capture when the pro gallery exits expand mode so I can return the items back to their original state as shown in the Normal View below. Of course, Velo said there is no way to track it. However, there are a lot of people in the Wix community with a lot of ingenuity.

@michelehobson I’ll be honest, I’m not sure what you’re trying to accomplish. My understanding of “expand mode” is that it covers up what is below it, so why do you need to change the order of things if they are underneath it? Perhaps some screenshots of your site would help me understand.
You might be able to do something with the click action api, but I have not ventured there yet so I couldn’t be of much help.
But if folks here said there’s no way to track this then I’m inclined to believe them, there are some real experts in this forum who are genuinely helpful and understanding.

@lmeyer Folks here didn’t say that, Velo did. Because of my lack of faith in Wix products and some of their employees, I was trying to determine if someone outside of Wix employ (or maybe the right person within it) would have a suggestion. I’m changing the order of the pictures for emphasis. When the gallery is not in expand mode the impact is made with #8 dead center, as displayed in the normal view below. When the gallery is in expand mode the impact is made with that image in the very last position as displayed in Expand mode below.

My problem, when I exit expand mode, I need to go back to #8 being dead center. However, in order to accomplish this, I need to capture when expand mode is closed. I inspected the page and found references to the fullscreen button. It’s there and I’m sure it can be captured, because when you click a button that opens or closes an object it triggers an event.