Append / Prepend creates duplicate/repeat divs.
Thanks for reaching out to the Optimizely Community!
Are you using append and prepend at the same time? If so this might explain the duplication of your images. To prevent duplication select either append or prepend to insert your images. This way you will implement the images only once.
If you're are not using both I suggest checking out the Visual Editor article in the Optimizely knowledgebase where it explains how to use Insert Image in your Visual Editor and correctly implement your images in the right place.
I hope this helps!
Technical Support Engineer
Thanks for the reply.
I checked for duplicate selectors, and obviously not using prepend and append together. also tried puting part code in Experiment JS and part in variation to call the Exp JS function and few other bits as well.
As I mentioned , after a couple seconds or so the image/div is again appended/prepended. This happened on more than one tests.
I have got a work around to stop the second time append if the #id already exist but wondering why this is occuring in the first place. It appears the variation code executes two times.
let me know probable reasons for it an if I can do anything from my end to stop this behaviour.