Match right form for these changes.
The general selectors previously used here matched either form. With this change, they will only match the form for which the selection was actually made.
This commit is contained in:
parent
2d96daee90
commit
1574b2dc37
1 changed files with 6 additions and 4 deletions
|
@ -35,13 +35,15 @@ $(document).ready(function() {
|
||||||
$(".t-shirt-size-selector").hide();
|
$(".t-shirt-size-selector").hide();
|
||||||
$('input[name=os1]:radio').change(function() {
|
$('input[name=os1]:radio').change(function() {
|
||||||
var input=$(this);
|
var input=$(this);
|
||||||
|
var tShirtSelector = input.parent().children('.t-shirt-size-selector')
|
||||||
|
var noShippingSelector = input.parent().children('input#no_shipping');
|
||||||
var value = input.val();
|
var value = input.val();
|
||||||
if (value == "Yes") {
|
if (value == "Yes") {
|
||||||
$(".t-shirt-size-selector").show();
|
tShirtSelector.show();
|
||||||
$("#no_shipping").val("2");
|
noShippingSelector.val("2");
|
||||||
} else {
|
} else {
|
||||||
$(".t-shirt-size-selector").hide();
|
tShirtSelector.hide();
|
||||||
$("#no_shipping").val("0");
|
noShippingSelector.val("0");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('*#amount').addClass("valid");
|
$('*#amount').addClass("valid");
|
||||||
|
|
Loading…
Reference in a new issue