Created
March 12, 2019 14:00
-
-
Save aatronco/00f20de447a54eef7e8d31180393e561 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| function international(country){ | |
| if($("#order_shipping_address_country").val() == country ){ | |
| $("input[value='127765']").parent().hide(); // International | |
| $("input[value='43917']").parent().show(); // Chile | |
| $("input[value='43914']").parent().show(); // Chile | |
| $("input[value='43915']").parent().show(); // Chile | |
| $("input[value='43916']").parent().show(); // Chile | |
| $("input[value='43914']").click(); // Chile | |
| }else{ | |
| $("input[value='127765']").parent().show(); // International | |
| $("input[value='127765']").click(); // International | |
| $("input[value='43917']").parent().hide(); // Chile | |
| $("input[value='43914']").parent().hide(); // Chile | |
| $("input[value='43915']").parent().hide(); // Chile | |
| $("input[value='43916']").parent().hide(); // Chile | |
| } | |
| } | |
| $("#order_shipping_address_country").change(function(){ | |
| var interval = setInterval(function(){ | |
| if($("#order_shipping_address_country").text()){ | |
| international("CL") | |
| clearInterval(interval) | |
| } | |
| }, 200) | |
| }); | |
| $(document).ready(function(){ | |
| var interval = setInterval(function(){ | |
| if($("#order_shipping_address_country").text()){ | |
| international("CL") | |
| clearInterval(interval) | |
| } | |
| }, 200) | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment