Rich-text Reply

Duplicating iframe within div

robinett 10-03-16

Duplicating iframe within div

I'm having an issue where I'm moving a div that has an iframe within it and it's duplicating the iframe within that div. This is how it looks in optimizely:





And this is how it looks live:

Screen Shot 2016-10-03 at 4.34.55 PM.png


I have confirmed that I'm only loading the optimizely JS once on the page which I know others have reported that being the issue.


Any other ideas what would be causing this?

Level 1

Mario 10-04-16

Re: Duplicating iframe within div

Hi there,


Thanks for reaching out to the community!


Could you please share the particular variation code with us?



Sr. Technical Support Engineer
EMEA | Amsterdam
inigam 10-06-16

Re: Duplicating iframe within div


I had the same issue and would wait for Mario to respond, as he is from Optimizely.

I although got around it using either e.preventdefault or putting a condition to fire variation code i.e. a function to check if <div> does not exist then run the variation code.

Hope that helps

Level 6
robertchan 10-10-16

Re: Duplicating iframe within div

Try conditional activation to wait for your element. If that doesn't resolve the issue then put console logs in your code and test directly in your browser's console.
Robert Chan

Experimentation Hero