> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Kameleoon.API.Variations

> Reference for the Kameleoon.API.Variations.execute method, which runs a variation.

This module provides methods to manage variations.

## execute

The `execute()` method executes JavaScript and applies CSS for the specified variation ID.

```javascript theme={null}
if (Kameleoon.API.Utils.querySelectorAll("#KameleoonPopin").length == 0) {
  Kameleoon.API.Experiments.getById(123456).variations.forEach(function (variation) {
    if (variation.name == "MyVariation") {
      Kameleoon.API.Variations.execute(variation.id);
    }
  });
}
```
