Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function do_experiment_1(){
- /* Ask Google Analytics which variation to show the user. */
- var chosenVariation = cxApi.chooseVariation();
- /* Define JavaScript for each page variation of this experiment. Using http://blog.crazyegg.com/2012/07/11/website-color-palettes/ */
- switch(chosenVariation) {
- case 1:
- /* Variation 1: Mea Cuppa */
- /* Widget background & text colour */
- jQuery(".wdpu-middle .WL_RegistrationWidget").attr("style", "border : 4px solid #FFF056 !Important;background-color: #DFE2DB;color:#191919;");
- jQuery(".wdpu-middle .WL_RegistrationWidget h2").attr("style", "color: #191919");
- /* Button: normal */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#FFF056',
- 'color' : '#191919',
- });
- /* Button: hover */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").hover(function(){
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css("background-color","#191919");
- });
- break;
- case 2:
- /* Variation 2: Black & White */
- /* Widget background & text colour */
- jQuery(".wdpu-middle .WL_RegistrationWidget").attr("style", "border : 4px solid #000000 !Important;background-color: #F9F9F9;color:#000000;");
- jQuery(".wdpu-middle .WL_RegistrationWidget h2").attr("style", "color: #000000");
- /* Button: normal */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#000000',
- 'color' : '#FFFFFF',
- });
- /* Button: hover */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").hover(function() {
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#424242',
- 'color' : '#FFFFFF',
- });
- });
- break;
- case 3:
- /* Variation 3: NHS Blue + Darker button */
- /* Widget background & text colour */
- jQuery(".wdpu-middle .WL_RegistrationWidget").attr("style", "border : 4px solid #1572B8 !Important;background-color: #eaf6ff;color:#000000;");
- jQuery(".wdpu-middle .WL_RegistrationWidget h2").attr("style", "color: #1572B8");
- /* Button: normal */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#1572B8',
- 'color' : '#FFFFFF',
- });
- /* Button: hover */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").hover(function() {
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#0c4e7c',
- 'color' : '#FFFFFF',
- });
- });
- break;
- case 4:
- /* Variation 4: John Lewis Green */
- /* Widget background & text colour */
- jQuery(".wdpu-middle .WL_RegistrationWidget").attr("style", "border : 4px solid #163E00 !Important;background-color: #e0ffce;color:#000000;");
- jQuery(".wdpu-middle .WL_RegistrationWidget h2").attr("style", "color: #163E00");
- /* Button: normal */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#163E00',
- 'color' : '#FFFFFF',
- });
- /* Button: hover */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").hover(function() {
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#010500', /* darker button on hover */
- 'color' : '#FFFFFF',
- });
- });
- break;
- case 5:
- /* Variation 5: The Big Top - Orange */
- /* Widget background & text colour */
- jQuery(".wdpu-middle .WL_RegistrationWidget").attr("style", "border : 4px solid #C63D0F !Important;background-color: #FDF3E7;color:#3B3738;");
- jQuery(".wdpu-middle .WL_RegistrationWidget h2").attr("style", "color: #C63D0F");
- /* Button: normal */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#C63D0F',
- 'color' : '#FFFFFF',
- });
- /* Button: hover */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").hover(function() {
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#7E8F7C',
- 'color' : '#FFFFFF',
- });
- });
- break;
- case 6:
- /* Variation 6: Lemon Stand App - Yellow bg + Red Button */
- /* Widget background & text colour */
- jQuery(".wdpu-middle .WL_RegistrationWidget").attr("style", "border : 4px solid #6DBDD6 !Important;background-color: #FFE658;color:#404040;");
- jQuery(".wdpu-middle .WL_RegistrationWidget h2").attr("style", "color: #6DBDD6");
- /* Button: normal */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#B71427',
- 'color' : '#FFFFFF',
- });
- /* Button: hover */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").hover(function() {
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#404040',
- 'color' : '#FFFFFF',
- });
- });
- break;
- case 7:
- /* Variation 7: Tori’s Eye ( Greens) */
- /* Widget background & text colour */
- jQuery(".wdpu-middle .WL_RegistrationWidget").attr("style", "border : 4px solid #005A31 !Important;background-color: #F3FAB6;color:#000000;");
- jQuery(".wdpu-middle .WL_RegistrationWidget h2").attr("style", "color: #005A31");
- /* Button: normal */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#005A31',
- 'color' : '#FFFFFF',
- });
- /* Button: hover */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").hover(function() {
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#A8CD1B',
- 'color' : '#FFFFFF',
- });
- });
- break;
- case 8:
- jQuery(".wdpu-middle .WL_RegistrationWidget").attr("style", "border : 4px solid #000000 !Important;background-color: #F9F9F9;color:#000000;");
- jQuery(".wdpu-middle .WL_RegistrationWidget h2").attr("style", "color: #000000");
- /* Button: normal */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#000000',
- 'color' : '#FFFFFF',
- });
- /* Button: hover */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").hover(function() {
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#424242',
- 'color' : '#FFFFFF',
- });
- });
- break;
- case 9:
- /* Variation 9: Cheese Survival Kit - Dark + Red */
- /* Widget background & text colour */
- jQuery(".wdpu-middle .WL_RegistrationWidget").attr("style", "border : 4px solid #DE1B1B !Important;background-color: #F6F6F6;color:#000000;");
- jQuery(".wdpu-middle .WL_RegistrationWidget h2").attr("style", "color: #DE1B1B");
- /* Button: normal */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#DE1B1B',
- 'color' : '#FFFFFF',
- });
- /* Button: hover */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").hover(function() {
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#2B2B2B',
- 'color' : '#FFFFFF',
- });
- });
- break;
- case 10:
- /* Variation 10: Nordic Ruby - Purple & Blue */
- /* Widget background & text colour */
- jQuery(".wdpu-middle .WL_RegistrationWidget").attr("style", "border : 4px solid #7D1935 !Important;background-color: #F5F3EE;color:#000000;");
- jQuery(".wdpu-middle .WL_RegistrationWidget h2").attr("style", "color: #7D1935");
- /* Button: normal */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#4A96AD',
- 'color' : '#FFFFFF',
- });
- /* Button: hover */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").hover(function() {
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#7D1935',
- 'color' : '#FFFFFF',
- });
- });
- break;
- case 11:
- /* Variation 11: Odopod - Pink & Off Black */
- /* Widget background & text colour */
- jQuery(".wdpu-middle .WL_RegistrationWidget").attr("style", "border : 4px solid #DF3D82 !Important;background-color: #FFFFFF;color:#191919;");
- jQuery(".wdpu-middle .WL_RegistrationWidget h2").attr("style", "color: #DF3D82");
- /* Button: normal */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#DF3D82',
- 'color' : '#FFFFFF',
- });
- /* Button: hover */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").hover(function() {
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#191919',
- 'color' : '#FFFFFF',
- });
- });
- break;
- case 12:
- /* Variation 12: eBay Blue */
- /* Widget background & text colour */
- jQuery(".wdpu-middle .WL_RegistrationWidget").attr("style", "border : 4px solid #00539F !Important;background-color: #F9F9F9;color:#555555;");
- jQuery(".wdpu-middle .WL_RegistrationWidget h2").attr("style", "color: #00539F");
- /* Button: normal */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#00509d',
- 'color' : '#FFFFFF',
- });
- /* Button: hover */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").hover(function() {
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#00539F',
- 'color' : '#FFFFFF',
- });
- });
- break;
- case 13:
- /* Variation 13: Amazon - White/Grey/Yellow */
- /* Widget background & text colour */
- jQuery(".wdpu-middle .WL_RegistrationWidget").attr("style", "border : 4px solid #F0C250 !Important;background-color: #FFFFFF;color:#333333;");
- jQuery(".wdpu-middle .WL_RegistrationWidget h2").attr("style", "color: #F0C250");
- /* Button: normal */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#F0C250',
- 'color' : '#333333',
- });
- /* Button: hover */
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").hover(function() {
- jQuery(".wdpu-middle .WL_RegistrationWidget #submit").css({
- 'background-color' : '#d6ab48',
- 'color' : '#333333',
- });
- });
- break;
- } // /switch
- } // /do_experiment_1
Add Comment
Please, Sign In to add comment