title: Get multiple values out of checkboxes
body: <p>I searched a lot on the internet but I still can't find the right answer to my question. I am trying to "print" all the selected values out of multiple checkboxes on my html-page. However, this works only for integers and not for other values. Right now, I use to following code:</p>
  
  <pre><code>&lt;div&gt;
  &lt;input type="checkbox" name="options[]" value="1" /&gt;
  &lt;input type="checkbox" name="options[]" value="2" /&gt;
  &lt;/div&gt;
  &lt;div&gt;
  &lt;input type="checkbox" name="options[]" value="2" /&gt;
  &lt;input type="checkbox" name="options[]" value="4" /&gt;
  &lt;input type="checkbox" name="options[]" value="5" /&gt;
  &lt;/div&gt;
  &lt;span&gt;&lt;/span&gt;
  </code></pre>
  
  <p>in combination with the following jquery code:</p>
  
  <pre><code>function calculate() {
  var arr = $.map($('input:checkbox:checked'), function(e, i) {
      return +e.value;
  });
  $('span').text('the checked values are: ' + arr.join(','));
  }
  
  calculate();
  $('div').delegate('input:checkbox', 'click', calculate);
  </code></pre>
  
  <p>The problem right now, is that I want to see all the values from the checkboxes, however, I do not want them to be integers, but they should have values like:</p>
  
  <pre><code>&lt;div&gt;
  &lt;input type="checkbox" name="options[]" value="Teamsport" /&gt;
  &lt;input type="checkbox" name="options[]" value="Individual sport" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>So that there will be an output like:
  <code>the selected values are: Teamsport,Ballsport,etc..</code></p>
  
  <p>I think the problem should be in the Jquery code, but I am not very familiar with javascript and jquery, so I hope that someone can help me. </p>