Skip to content

Commit

Permalink
chore: 3.2.1 [skip ci]
Browse files Browse the repository at this point in the history
## [3.2.1](v3.2.0...v3.2.1) (2018-07-03)

### Bug Fixes

* remove types from git history ([41d1440](41d1440))
  • Loading branch information
semantic-release-bot committed Jul 3, 2018
1 parent 41d1440 commit 8a32b59
Show file tree
Hide file tree
Showing 17 changed files with 1,626 additions and 2 deletions.
60 changes: 60 additions & 0 deletions dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Skift: A/B test basic example</title>
<style>
body {
font-family: Helvetica Neue, serif;
}

#test-button {
background-color: #0000FF;
width: 200px;
padding: 30px;
color: #FFFFFF;
text-align: center;
border: none;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="skift.js"></script>
</head>
<body>

<h1>Skift: A/B test basic example</h1>
<p>This is an A/B split test</p>
<p>Below there's a div. It will be blue originally, and orange if you're in the A/B test.</p>

<button id="test-button">This is the original div</button>
<button onclick="skift.reset();">Reset</button>

<script type="text/javascript">
skift.config({
uiCondition: () => true
});

skift.create('name-of-a-test').setCondition(() => {
return true;
}).addVariation({
name: 'control' // No setup required.
}).addVariation({
name: 'name-of-a-variation',
setup() {
document.getElementById('test-button').style.backgroundColor = '#ffcc00';
}
}).setup();

skift.create('another-test').setCondition(() => {
return true;
}).addVariation({
name: 'control' // No setup required.
}).addVariation({
name: 'bigger-button',
setup() {
document.getElementById('test-button').style.width = '300px';
}
}).setup();
</script>
<script type="text/javascript" src="skift.js"></script></body>
</html>
Loading

0 comments on commit 8a32b59

Please sign in to comment.