title: get the ids when more than one checkbox is checked
body: <p>I need to get the ids of every checkbox checked and save into var:</p>
  
  <p>this is my code:</p>
  
  <pre><code>&lt;input type="checkbox" id="p1_perro" class="checks" name="p1[]" value="p1_perro" /&gt;
  &lt;label&gt;Perro&lt;/label&gt;
  &lt;br /&gt;
  
  &lt;input type="checkbox" id="p1_gato" class="checks" name="p1[]" value="p1_gato" /&gt;
  &lt;label&gt;Gato&lt;/label&gt;
  &lt;br /&gt;
  
  &lt;input type="checkbox" id="p1_pajaro" class="checks" name="p1[]" value="p1_pajaro" /&gt;
  &lt;label&gt;Pájaro&lt;/label&gt;
  &lt;br /&gt;
  
  &lt;input type="checkbox" id="p1_roedor" class="checks" name="p1[]" value="p1_roedor" /&gt;
  &lt;label&gt;Roedor&lt;/label&gt;
  &lt;br /&gt;
  
  &lt;input type="checkbox" id="p1_reptil" class="checks" name="p1[]" value="p1_reptil" /&gt;
  &lt;label&gt;Reptil&lt;/label&gt;
  &lt;br /&gt;
  
  &lt;input type="checkbox" id="p1_otros" class="checks" name="p1[]" value="p1_otros" /&gt;
  &lt;label id="q_1"&gt;Otros&lt;/label&gt;
  </code></pre>
  
  <p>and this is the javascript:</p>
  
  <pre><code>$("#p1_perro, #p1_pajaro, #p1_roedor, #p1_reptil, #p1_otros").live("click", function() {
      var valueAnimal = this.id;
      if(valueAnimal == 'p1_perro'){
        $( "#otroAnimal" ).text( "¿Que edad tiene tu perro?" );
      }
  
      if(valueAnimal == 'p1_pajaro'){
        $( "#otroAnimal" ).text( "¿Que edad tiene tu p&amp;aacute;jaro?" );
      }
  
      if(valueAnimal == 'p1_roedor'){
        $( "#otroAnimal" ).text( "¿Que edad tiene tu roedor?" );
      }
  
      if(valueAnimal == 'p1_reptil'){
        $( "#otroAnimal" ).text( "¿Que edad tiene tu reptil?" );
      }
  
      if(valueAnimal == 'p1_otros'){
        $( "#otroAnimal" ).text( "¿Que edad tiene tu animal?" );
      }
  
      if (this.checked) {
          $("#bloque_perro").show(); 
      }else{
          $("#bloque_perro").hide(); 
      }
  });
  </code></pre>
  
  <p>in this example just I can get one id when user select one more than one checkbox.</p>