> ## 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

> Referenz der Methode Kameleoon.API.Variations.execute, die eine Variante ausführt.

Dieses Modul stellt Methoden zur Verwaltung von Variationen bereit.

## execute

Die Methode `execute()` führt JavaScript aus und wendet CSS für die angegebene Variations-ID an.

```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);
    }
  });
}
```
