title: Need for loop jquery
body: <p>I have the following code</p>
  
  <pre><code>$('.button1').click(function(){
      $('.docs_main2,.docs_main3,.docs_main4,.docs_main5,.docs_main6,.docs_main7,.docs_main8,.docs_main9,.docs_main10,.docs_main11,.docs_main12,.docs_main13,.docs_main14,.docs_main15,.docs_main16,.docs_main17,.docs_main18,.docs_main19').fadeOut("slow");
  });
  
  $('.button2').click(function(){
      $('.docs_main1,.docs_main3,.docs_main4,.docs_main5,.docs_main6,.docs_main7,.docs_main8,.docs_main9,.docs_main10,.docs_main11,.docs_main12,.docs_main13,.docs_main14,.docs_main15,.docs_main16,.docs_main17,.docs_main18,.docs_main19').fadeOut("slow");
  });
  </code></pre>
  
  <p>In this, when I click on "button1" class name, then other button 2 to 18 would be hidden.<br>
  When I click on "button2" class name, then other button 3 to 18 and button1 would be hidden.</p>
  
  <p>I need this code in for loops. Can some one provide me this.</p>