Show field based on radio buttons


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $("input[name='ep']").change(function(){
  2. if ($("input[name='ep']:checked").val() == 'no')
  3. $('#yourpt').hide();
  4. else if ($("input[name='ep']:checked").val() == 'yes')
  5. $('#yourpt').show();
  6. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.