- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Variation of Popup and No-Popup

Variation of Popup and No-Popup
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi!
I'm trying to make a popup using inspiered by this article on your blog:
http://blog.optimizely.com/2013/09/12/how-to-add-a-lightbox-to-an-experiment/
In the very last section there are links to copy-paste friendly versions of the code needed to set up the popup in our own experiment. Very nice of you.
Unfortunately, the link to the Java-script code that is needed for the popup to work right appears to be broken. Is there any chance you could please fix the link and republish or simply send me the Javascript code needed to make it run?
Thank you!
Kind regards
Martin Vinter
Solved! Go to Solution.

Re: Variation of Popup and No-Popup
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi Martin,
I agree that the article might be a bit confusing when it comes to the appendix. All you need to reconstruct and run the popup is provided in the two links 'Variation Code ' and 'Global CSS'.
Please copy & paste the variation code into your edit code box. The variation code consists of all the HTML markup and the JavaScript code you need.
$("div.closer").bind("click", function(){document.getElementById("overlay").style.display="none"; document.getElementById("lightbox").style.display="none"});
After that copy the CSS into the 'Experiment CSS', the popup will now appear and you can customize it.
Happy testing!
Mario
EMEA | Amsterdam
Re: Variation of Popup and No-Popup
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Re: Variation of Popup and No-Popup
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi there - is there a variation to this code that would allow for the window to be closed when the user clicks outside of it?
Thanks! Justin