title: How to uncheck checkbox when radio button is checked and uncheck radio button when checkboxes are checked using Javascript
body: <pre><code>&lt;div id="a"&gt;
    &lt;input type="radio" name="sex" value="male"&gt;Male&lt;br&gt;
    &lt;input type="radio" name="sex" value="female"&gt;Female
  &lt;/div&gt;
  
  &lt;div id="b"&gt;
    &lt;input type="checkbox" name="vehicle" value="Bike"&gt;I have a bike&lt;br&gt;
    &lt;input type="checkbox" name="vehicle" value="Car"&gt;I have a car 
  &lt;/div&gt;
  </code></pre>
  
  <p>If checkboxes are checked then radio buttons should be unchecked and when radio buttons are checked, checked checkboxes should be unchecked.</p>
  
  <pre><code>             function uncheckDisabiltiesCheckbox(){
       var isChecked1 = document.getElementById('disabilitiesCheckbox1').checked;
       var isChecked2 = document.getElementById('disabilitiesCheckbox2').checked;
       var isChecked3 = document.getElementById('disabilitiesCheckbox3').checked;
       var isChecked4 = document.getElementById('disabilitiesCheckbox4').checked;
       var isChecked5 = document.getElementById('disabilitiesCheckbox5').checked;
       var isChecked6 = document.getElementById('disabilitiesCheckbox6').checked;
       var isChecked7 = document.getElementById('disabilitiesCheckbox7').checked;
       var isChecked8 = document.getElementById('disabilitiesCheckbox8').checked;
       var isChecked9 = document.getElementById('disabilitiesCheckbox9').checked;
       var isChecked10=document.getElementById('disabilitiesCheckbox10').checked;
               var isChecked11=document.getElementById('disabilitiesCheckbox11').checked;
               var isChecked12=document.getElementById('disabilitiesCheckbox12').checked;
               var isChecked13=document.getElementById('disabilitiesCheckbox13').checked;               
  
  
       if(isChecked1){
           document.getElementById('disabilitiesCheckbox1').checked = false;
       }
       if(isChecked2){
           document.getElementById('disabilitiesCheckbox2').checked = false;
       }
       if(isChecked3){
           document.getElementById('disabilitiesCheckbox3').checked = false;
       }
       if(isChecked4){
           document.getElementById('disabilitiesCheckbox4').checked = false;
       }
       if(isChecked5){
           document.getElementById('disabilitiesCheckbox5').checked = false;
       }
       if(isChecked6){
           document.getElementById('disabilitiesCheckbox6').checked = false;
       }
       if(isChecked7){
           document.getElementById('disabilitiesCheckbox7').checked = false;
       }
       if(isChecked8){
           document.getElementById('disabilitiesCheckbox8').checked = false;
       }
       if(isChecked9){
           document.getElementById('disabilitiesCheckbox9').checked = false;
       }
       if(isChecked10){
           document.getElementById('disabilitiesCheckbox10').checked = false;
       }
       if(isChecked11){
           document.getElementById('disabilitiesCheckbox11').checked = false;
       }
       if(isChecked12){
           document.getElementById('disabilitiesCheckbox12').checked = false;
       }
       if(isChecked13){
           document.getElementById('disabilitiesCheckbox13').checked = false;
       }
     }
  </code></pre>
  
  <p>Above is the code which unchecks all the checkboxes , when radio button is selected. How to get started with unchecking the radio buttons when checkboxes are checked.</p>
  
  <p>disabilities.js</p>
  
  <pre><code>             $(document).ready(function(){
  
       $('#disabilitiesRadio :radio').click(function(){
             $('#disabilitiesCheckbox :checkbox').prop('checked', false);
       });
  
       $('#disabilitiesCheckbox :checkbox').click(function(){
           $('#disabilitiesRadio :radio').prop('checked', false);
       });
            });
  </code></pre>