Created
November 22, 2017 05:55
-
-
Save aayushdrolia/9f72305c7074efa03c10479455fdbad3 to your computer and use it in GitHub Desktop.
FB Cart js and css
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
$(".coupon-env").addClass("coupon-visible"); | |
$(".coupon > .btn-primary").val("APPLY DISCOUNT"); | |
$(".sidebar_zip_code_checker_error").html("Your target is out of our area. Sorry.") | |
$("#coupon_code").attr("placeholder", "enter discount"); | |
$(".cart_totals h2").html("BASKET TOTALS"); | |
$(".cart_totals h2").show(); | |
$("#update-cart-btn").css("background-color", "#007B93"); | |
$('body').bind('beforeunload',function(){ | |
$(".DeliveryError").html("FREE DELIVERY"); | |
}); | |
$('div.cart_totals > table > tbody > tr.shipping > td > p').html("FREE DELIVERY!") | |
$('div.cart_totals > table > tbody > tr.shipping > td > p').css('color', 'black'); | |
$('div.cart_totals.calculated_shipping > table > tbody > tr.shipping > td').html("FREE DELIVERY!"); | |
$('div.cart_totals.calculated_shipping > table > tbody > tr.shipping > td').css("color", "black"); | |
$('#wp_sidebarzipcodechecker-2').before("<a href='#' class='showZipCheck'>Is your target in our area?</a>"); | |
$('.widgettitle').html("Let's check that zip"); | |
$('#checkoutZipcode > .wpb_wrapper > #wp_sidebarzipcodechecker-2 > h2').css("font-size","18px"); | |
$('#checkoutZipcode > .wpb_wrapper > #wp_sidebarzipcodechecker-2 > h2').css("color","black"); | |
$("#update-cart-btn").html('Update Basket'); | |
$( ".showZipCheck" ).click(function(event) { | |
event.preventDefault(); | |
$(this).slideUp(); | |
$("#checkoutZipcode > .wpb_wrapper > #wp_sidebarzipcodechecker-2").slideDown(); | |
}); | |
$('#zip_code').attr("placeholder", "Enter a zipcode to check"); | |
$( document ).ajaxComplete(function() { | |
$(".DeliveryError").css("color", "black"); | |
$(".DeliveryError").html("FREE DELIVERY!"); | |
$(".coupon-env").addClass("coupon-visible"); | |
$("div.cart_totals.calculated_shipping > table > tbody > tr.shipping > td").css("color", "black"); | |
$("div.cart_totals.calculated_shipping > table > tbody > tr.shipping > td").html("FREE DELIVERY!"); | |
$('.shipping > td:nth-child(2) > p:nth-child(1)').html('FREE DELIVERY!'); | |
$('.shipping > td:nth-child(2) > p:nth-child(1)').css("color", "black"); | |
if ( $( ".shop-empty-cart-page" ).length ) { | |
$("#checkoutZipcode").hide(); | |
} | |
}); | |
/*-------------------------------------------JS ENDS HERE--------------------------------------------------------*/ | |
/*-----------------------------------------CSS STARTS HERE-------------------------------------------------------*/ | |
.sidebar_zip_code_checker_success { | |
border:3px solid green; | |
color: green !important; | |
text-transform: uppercase; | |
font-style: bold; | |
font-size: 17px; | |
padding: 7px; | |
} | |
.sidebar_zip_code_checker_error { | |
border:3px solid red; | |
color: red !important; | |
text-transform: uppercase; | |
font-style: bold; | |
font-size: 17px; | |
padding: 7px; | |
display:inline-block; | |
width:100%; | |
} | |
widgettitle { | |
.display:none; | |
} | |
#zip_code { | |
border-radius:15px; | |
text-align:center; | |
} | |
.footerstillhere { | |
display:none !important; | |
} | |
.yellowhandwritingfooter { | |
display:none !important; | |
} | |
.row .cart-bottom-details { | |
margin-bottom:0 !important; | |
} | |
.sidebar_zip_code_checker_error { | |
color:black; | |
} | |
.sidebar_zip_code_checker_success { | |
color:black; | |
} | |
input { | |
color:black; | |
} | |
#wp_sidebarzipcodechecker-2 { | |
text-align:center; | |
} | |
.sidebar_zip_code_checker_success { | |
width:100%; | |
} | |
#wp_sidebarzipcodechecker-2 > p { | |
text-align:center; | |
} | |
#wp-submit { | |
font-size:14px; | |
width:100%; | |
padding: 10px 16px; | |
} | |
.sidebar_zip_code_checker_success { display: none; } | |
.sidebar_zip_code_checker_success ~ .sidebar_zip_code_checker_success { display: inline-block; } | |
#checkoutZipcode { | |
display:none; | |
} | |
input[name="apply_coupon"] { | |
color:white !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment