Streaming live at 10am (PST)

Trigger Javascript change on slider slideout


#1

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


#2

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.


#3

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)


#4

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...


#5

!!!

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


#6

unfortunately it doesn't


#7

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