Created
November 11, 2015 17:17
-
-
Save codenamezjames/0a2b063716ed7dd47549 to your computer and use it in GitHub Desktop.
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
$(document).ready(function () { | |
var ship_check = "old"; | |
$('#no').click(function () { | |
$('.shippinginfo').show() | |
var shipping_Country2 = $("#shippingCountry2").val(); | |
if (shipping_Country2 == 'USA'){ | |
$('#rblShippingMethod_0').val(1).attr('disabled', false); | |
} | |
else if (shipping_Country2 == 'Canada'){ | |
$('#rblShippingMethod_0').val(1).attr('disabled', false); | |
$('#rblShippingMethod_0').val(2).attr('disabled', true); | |
} | |
else{ | |
$('#rblShippingMethod_0').val(2).attr('disabled', true); | |
} | |
ship_check = "new"; | |
}); | |
$('#yes').click(function () { | |
$('.shippinginfo').hide(); | |
var country_shipping = $("#country").val(); | |
if (country_shipping == 'USA'){ | |
$('#rblShippingMethod_0').val(1).attr('disabled', false); | |
} | |
else if (country_shipping == 'Canada'){ | |
$('#rblShippingMethod_0').val(1).attr('disabled', false); | |
$('#rblShippingMethod_0').val(2).attr('disabled', true); | |
} | |
else{ | |
$('#rblShippingMethod_0').val(2).attr('disabled', true); | |
} | |
ship_check = "old"; | |
}); | |
$("#country").change(function(){ | |
var country_shipping1 = $("#country").val(); | |
if (ship_check == "old"){ | |
if (country_shipping1 == 'USA'){ | |
$('#rblShippingMethod_0').val(1).attr('disabled', false); | |
} | |
else if (country_shipping1 == 'Canada'){ | |
$('#rblShippingMethod_0').val(1).attr('disabled', false); | |
// $('#rblShippingMethod_0').val(2).attr('disabled', true); | |
} | |
else{ | |
$('#rblShippingMethod_0').val(2).attr('disabled', true); | |
} | |
} | |
}); | |
$("#shippingCountry2").change(function(){ | |
var country_shipping2 = $("#shippingCountry2").val(); | |
if (ship_check == "new"){ | |
if (country_shipping2 == 'USA'){ | |
$('#rblShippingMethod_0').val(1).attr('disabled', false); | |
} | |
else if (country_shipping2 == 'Canada'){ | |
$('#rblShippingMethod_0').val(1).attr('disabled', false); | |
// $('#rblShippingMethod_0').val(2).attr('disabled', true); | |
} | |
else{ | |
$('#rblShippingMethod_0').val(2).attr('disabled', true); | |
} | |
} | |
}); | |
$('input[name="btSubmit"]').click(function () { | |
$('#rblShippingMethod_0').attr('disabled', false); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment