Trigger Javascript change on slider slideout

Hello everyone,

Since I can’t find a way to turn an iframe on and off on slide in/out, I was thinking I could use a workaround.

I could use a single Iframe and change its content (the page it ponts to) based on slider’s behavior

hence my question: is it possible to add an event so that, let’s say:

  • when slide1 is in, set embed to page1
  • when slide1 is out, set embed to page2

and so on… any help is greatly appreciated, while I’ll keep looking for alternatives

Could you share the read-only link so we can take a look at the project? You have another similar post up and I want to make sure I understand what you are trying to achieve.

Did you try adding each iframe to individual slides? Or adding an interaction with the trigger “slider” to the embed? Just thinking out loud.

Hi J!

Thank you for answering, here is the link:
https://preview.webflow.com/preview/discovr?preview=cdf893fa16cd9672a8b00754c6ae967b

my problem is that on iOS I can run only one embed at the time.
if all the embeds in the slider are running at the same time, none of them will respond to the phone’s gyroscope on iOS.

So I’m looking for ANY way to make sure that ONLY the embed in the CURRENT slide is running. All other embeds should be “frozen” when not in view. I was wondering if this can be achieved in Webflow.

Otherwise another way to achieve this could be to have only one embed, and trigger the loading of different pages in it via slider’s buttons…? (I’m looking in this direction at the moment)

I haven’t tried anything like that so I couldn’t say for sure.

Not sure if making the embed item hidden until the slide comes into view would work or not…

!!!

Great call, I’ll try it immediately and let you know

unfortunately it doesn’t

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.