Last active
August 29, 2015 14:06
-
-
Save bavey/ad3165302ccca7162400 to your computer and use it in GitHub Desktop.
Variant Testing for New Homepage
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
// | |
// Optimizely | |
// Variant Testing for New Homepage | |
// | |
//----------------------------------------------------------------------------- | |
// 1. 3 Circle DM Consult A (Sign Up Beginning) | |
//----------------------------------------------------------------------------- | |
// Toggle module | |
jQuery('.header .mad-libs').hide(); | |
jQuery('.header .static').show(); | |
// Turn off default button | |
jQuery('.get-started-normal').hide(); | |
// Update urls | |
jQuery('.find-a-pro .architects a').attr('href', '#!/start-a/step1'); | |
jQuery('.find-a-pro .engineers a').attr('href' , '#!/start-a/step1'); | |
jQuery('.find-a-pro .contractors a').attr('href', '#!/start-a/step1'); | |
//----------------------------------------------------------------------------- | |
// 2. 3 Circle DM Consult (Sign Up End) | |
//----------------------------------------------------------------------------- | |
// Toggle module | |
jQuery('.header .mad-libs').hide(); | |
jQuery('.header .static').show(); | |
// Turn off default button | |
jQuery('.get-started-normal').hide(); | |
// Update urls | |
jQuery('.find-a-pro .architects a').attr('href', '#!/start-b/step1'); | |
jQuery('.find-a-pro .engineers a').attr('href' , '#!/start-b/step1'); | |
jQuery('.find-a-pro .contractors a').attr('href', '#!/start-b/step1'); | |
//----------------------------------------------------------------------------- | |
// 2. 3 Circle Results Page DM Consult | |
//----------------------------------------------------------------------------- | |
// Toggle module | |
jQuery('.header .mad-libs').hide(); | |
jQuery('.header .static').show(); | |
// Turn off default button | |
jQuery('.get-started-normal').hide(); | |
// Update urls | |
jQuery('.find-a-pro .architects a').attr('href', '#!/results/architecture/multifamily/step1'); | |
jQuery('.find-a-pro .engineers a').attr('href', '#!/results/structural-engineers/multifamily/step1'); | |
jQuery('.find-a-pro .contractors a').attr('href', '#!/results/general-contractors/multifamily/step1'); | |
//----------------------------------------------------------------------------- | |
// 3. Madlibs DM Consult | |
//----------------------------------------------------------------------------- | |
// Toggle module | |
jQuery('.ie8 .header .static').show(); | |
jQuery('.ie9 .header .static').show(); | |
jQuery('.header .static').hide(); | |
jQuery('.header .mad-libs').show(); | |
// Turn off default button | |
jQuery('.get-started-normal').hide(); | |
// Display appropriate button | |
jQuery('button.get-started-results-dmconsult').hide(); | |
jQuery('button.get-started-step1').css({'display': 'block'}); | |
//----------------------------------------------------------------------------- | |
// 4. Madlibs Results Consult Form | |
//----------------------------------------------------------------------------- | |
// Toggle module | |
jQuery('.ie8 .header .static').show(); | |
jQuery('.ie9 .header .static').show(); | |
jQuery('.header .static').hide(); | |
jQuery('.header .mad-libs').show(); | |
// Turn off default button | |
jQuery('.get-started-normal').hide(); | |
// Display appropriate button | |
jQuery('button.get-started-step1').hide(); | |
jQuery('button.get-started-results-dmconsult').css({'display': 'block'}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added a default button which is turned on by default in the CSS so I have jQuery turning it off. In case the experiment is deactivated, the default button will work fine.