jquery - based on radio button selection how to show/hide fields? -


based on radio button selection how show/hide fields in jquery?

<span class="m_h_checkbox_span">     <input type="radio" id="resume_format" name="resume_format" alt="docx" title="docx" value="docx">     <div class="text">docx</div> </span> <span class="m_h_checkbox_span">     <input type="radio" id="resume_format" name="resume_format" alt="pdf" title="pdf" value="pdf">     <div class="text">pdf</div> </span> <div class="case_form_filed" id="employee_name_row">     <label for="employee_name">employee name</label>     <input type="text" placeholder="" value="" class="text_box_case" name="employee_name" id="employee_name" onchange="textfieldonchangeevent(this,&quot;ed947c25f2064e3bb7a6449646744e5a&quot;,&quot;-1&quot;)"> </div> 

lots of issues code , question isn't clear on want hide. here best guess come with.

please see fiddle corrections code. had lot of problems.

http://jsfiddle.net/incept0/brr7dkm6/

  (function($){     $(function(){           $('input:radio[name=resume_format]').change(function () {              if ($(this).prop('checked') === true) {                 $("input:radio[name=resume_format]").not(':checked').each(function() {                            $(this).parent().hide();                            $(this).hide();                  });             }         });     });   })(jquery); 

Comments