The Code Editor


The Optimizely Visual Editor works by translating your variations into JavaScript code -- specifically, a library called jQuery. Every time you make a change in the Optimizely Editor, Optimizely creates a line of jQuery code that finds the selected element, and then makes the changes you selected in the Editor.

You can see (and edit) this code by clicking in the lower-right-hand corner of the Editor, which pops open the Code Editor (also known as a "code store"). You can also create changes directly in the box using JavaScript or jQuery.

You don't have to be an expert to use the feature. Many non-technical users edit their code to adjust pixel size or modify the size of elements. Plus, if you make a mistake, you can always "Undo" your changes!


Did you know that you can also run JavaScript or CSS at the experiment level, across all variations? Check our our Experiment JavaScript and CSS article to learn more! Additionally, select Enterprise users can use Project JavaScript to insert custom JavaScript at the project level that runs before the Optimizely snippet, without having to make direct changes to your site's code.