Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- if ("junoSubscriptionEmail" in localStorage) {
- console.log(localStorage.junoSubscriptionEmail);
- $('input[name="email"]').val(localStorage.junoSubscriptionEmail);
- }
- $('.ms-title-text-show').click();
- var checkExist = setInterval(function() {
- if ($('#ps__container').length) {
- updateSMSElement();
- clearInterval(checkExist);
- }
- }, 100);
- function updateSMSElement() {
- var phoneContainerParent = $('input[name="phone"]').parent().parent();
- var ps__container = $('#ps__container');
- var smsHeadline = "Get 25% Off Next Order of Whitening Refills";
- var smsSubline = "Sign up to the SNOW VIP list and we'll text you a coupon code off your next order";
- //create container div for content
- $('<div id="ps__content"></div>').insertBefore('#ps__footer');
- //move content into content container
- $('#ps__container .ch-checkbox').appendTo($('#ps__content'));
- $('#ps__container .ch-label').appendTo($('#ps__content'));
- //change initial text
- $('#ps__content .ch-label span span').text(smsHeadline)
- //create additional text
- $('<p>' + smsSubline + '</p>').insertAfter($('#ps__content .ch-label'));
- //style div
- $('#ps__content').css({
- 'padding': '10px',
- 'border': 'solid 1px #e6e6e6',
- 'background': '#fafafa'
- });
- //style headline
- $('#ps__content label span.ch-custom-label').css({
- 'font-weight': 'bolder',
- 'color': '#333333'
- });
- //style subline
- $('#ps__content p').css({
- 'line-height': '1.2',
- 'font-size': '14px'
- });
- //move container to phone field
- $(phoneContainerParent).after(ps__container);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement