Hello everybody, I have a problem :
I have a radio input and I would like that depending on what you choose, it displays another checkbox selection.
how could I do if I want to insert checkbox selecion into the if/else statements so that if i choose luch it shows me another checkbox selection with other fields??Code:<input type="radio" name="food" value="Breakfast" /> Breakfast <input type="radio" name="food" value="Lunch" /> Lunch <input type="radio" name="food" value="Dinner" /> Dinner I coded this: <script> $("input[name='food']").change(function(){ if ($("input[name='food']:checked").val() == 'Breakfast') { $("p").show();} else if ($("input[name='food']:checked").val() == 'Lunch') { } else { } }); </script>
Thank you so much.


Reply With Quote
Bookmarks