title: Checking Multiple checkboxes using Jquery
body: <p>In my application I am using a single checkbox to 'Select All' other checkboxes. And below is my code snippet which works for me. But I need a shorter method to reduce my code lines.</p>
  
  <pre><code>$('#CheckAll').change(function(){   
                  if ($(this).is(":checked")) {                                       
                      $('.checkboxes').each(function(){                                   
                          $(this).prop("checked", true);                      
                      });
                  }
                  else{               
                      $('.checkboxes').each(function(){                                   
                          $(this).prop("checked", false);                                                 
                      });             
                  }               
              });
  </code></pre>
  
  <p>Is there any easier way to achieve this  using "Ternary Operator".  </p>