title: While clicking one of the three buttons cannot disable the other two jQuery
body: <p>I'm developing a test. I want to disable two of the three buttons when one of them is clicked and to slideDown() a comment under the buttons when one of the options is chosen. I manage to make comments slide down but cannot disable the other comments when the other buttons are pushed. I'm using jQuery. I have already read many possible solutions but they don't seem to work in my case. </p>
  
  <p>Here's a piece of my code:</p>
  
  <pre><code>        &lt;div class="btns"&gt;
              &lt;button class="btn" id="q1b1" value=0&gt;A&lt;/button&gt;
              &lt;button class="btn" id="q1b2" value=1&gt;B&lt;/button&gt;
              &lt;button class="btn" id="q1b3" value=0&gt;C&lt;/button&gt;
          &lt;/div&gt;
          &lt;div class="content"&gt;
              &lt;div class="com" id="q1com1"&gt;
                  &lt;p&gt;
                      comment1
                  &lt;/p&gt;
              &lt;/div&gt;
              &lt;div class="com" id="q1com2"&gt;
                  &lt;p&gt;
                      comment2
                  &lt;/p&gt;
              &lt;/div&gt;
              &lt;div class="com" id="q1com3"&gt;
                  &lt;p&gt;
                      comment3
                  &lt;/p&gt;
              &lt;/div&gt;
          &lt;script&gt;
              $(document).ready(function(){
                  if($('#q1b1').click(function(){
                      $('#q1com1').slideDown(500);
                      $('#q1b2', '#q1b3').prop('disabled', true);
                  }));
                  else if($('#q1b2').click(function(){
                      $('#q1com2').slideDown(500);
                      $('#q1b1', '#q1b3').prop('disabled', true);
                  }));
                  else if($('#q1b3').click(function(){
                      $('#q1com3').slideDown(500);
                      $('#q1b1', '#q1b2').prop('disabled', true);
                  }));
              });
          &lt;/script&gt;    
          &lt;/div&gt;
  </code></pre>