Java script CMS template slider page issue

Hi all, I’m having an issue with some javascript that I got from a tutorial by EliShmerler on how to build a dynamic multi-image slider. I’m building out a CMS collection template page for a client that builds pre-designed homes. For each design, there are a few variables that complicate the design of the page. Firstly some designs have one size, some two, and some three. I’ve gotten around this by building three layouts and using a conditional visibility option, which is working well. The second variable is that some of the designs have two facade option images, while others have up to six. I’m showing the facade images in a slider. I’ve used the tutorial to make a slider that pulls only the number of images that are loaded to the multi-image field for that collection item. And it’s working great. The only trouble is, as I’m using three layouts (with the conditional visibility option), I need to have three unique sliders all running off the same script. This isn’t working. I imagine this is because the script requires setting unique IDs to two specific elements of the slider. As I don’t know any JS I’m not sure how I can tweak the code so I can have unique IDs for the two additional sliders referenced in the JS. Any help with this would be super appreciated!

Many thanks in advance,


Here is my public share link: Webflow - Ironsons Homes
(how to access public share link)

Oh, please disregard this query - I’ve sorted the issue.

Thanks