select input with given name and value from radiobutton

select input with given name and value from radiobutton

I’m trying to display a div tag, if the user selects option 4 from radiobuttion. I'm not an expect on javascript!

  1. <script type="text/javascript">
  2.     $(document).ready(function () {
  3.         $("#GenderInAnotherWay").hide();

  4.         $("input[name='Gender'][value=4]").prop("checked", true);{
  5.             $("#GenderInAnotherWay").toggle();
  6.         });
  7.     })
  8. </script>