/checkout-optimization-test.js Secret
Created
October 31, 2019 00:41
Checkout Optimization Test
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
require(['jquery'], function($) { | |
// <!-- ****************************************************--> | |
// <!-- Floating labels for forms --> | |
// <!-- ****************************************************--> | |
$('.input-box').on('input', function() { | |
var $field = $(this).closest('.input-set-wrap'); | |
if (this.value) { | |
$field.addClass('field-label-float'); | |
} else { | |
$field.removeClass('field-label-float'); | |
} | |
}); | |
function showAltAddress(){ | |
$('.street-name-box-2').fadeIn(); | |
$('.alt-address-link').fadeOut(); | |
} | |
$( ".street-name-box-1" ).append('<p class="alt-address-link" onclick="showAltAddress()" style="color:#e72b1e; text-decoration:underline;">Add Apartment #, suite, etc (optional)</p>' ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment