-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## [3.2.1](v3.2.0...v3.2.1) (2018-07-03) ### Bug Fixes * remove types from git history ([41d1440](41d1440))
- Loading branch information
1 parent
41d1440
commit 8a32b59
Showing
17 changed files
with
1,626 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.