Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $("#gift_options").hide();
- $("#Email").hide();
- $(function () {
- $("#Voucher_Type").change(function() {
- var val = $(this).val();
- if(val === "Digital{y:voucher_email}") {
- $("#Email").show();
- }
- else if(val === "Print{y:voucher_print}") {
- $("#Email").hide();
- $('#Email').val('');
- }
- });
- });
- $(function () {
- $("#Gift").change(function() {
- var val = $(this).val();
- if(val === "yes") {
- $("#gift_options").show();
- $("#shipto").prop('required',true);
- $("#Email").prop('required',true);
- $("#Notes").prop('required',true);
- }
- else if(val === "no") {
- $("#gift_options").hide();
- $('#shipto').val('');
- $('#Email').val('');
- $('#Notes').val('');
- $("#shipto").prop('required',false);
- $("#Email").prop('required',false);
- $("#Notes").prop('required',false);
- }
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement