Every time you make a change in the Optimizely editor, a new line of JavaScript code is appended to the variation's code store. This code works by using jQuery to find the selected element, then making the changes you made in the editor. You can see (and edit) this code by clicking on Edit Code in the lower right hand corner of the editor. The graphical Optimizely editor works by translating your variations into JavaScript code.
When Optimizely shows this variation on a web page, the variation is rendered in the browser by executing the JavaScript from the code store.
If you want to change the JavaScript code or enter custom JavaScript associated with an element, you can do so by manually editing the code in the code store. Please note that, while Optimizely gives you incredible power to manually change the variation's code, it is your responsibility to ensure that any changes you make render properly on the page, potentially across different browsers and operating systems. jQuery selectors work cross-browser, but any custom functions you use should be tested before running the experiment.
The edit code button is in the lower right hand corner:
When clicked, the code store opens:
Changes will not show up until you click 'Apply'. Clicking 'Cancel' will remove and changes made directly to the 'edit code' section after the last time you either clicked 'Apply' or made changes outside of the 'edit code' section.