title: Multiple div selection onclick
body: <p>I have multiple divs with their id's, and onclick i store the id of the div in an input value, but it only takes one id, i want to have multiple selection and store all the selected div id's in the same input, here is my code: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  function storeId (el) {
       $('input').val(el.id);
    }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>div{
  background-color:red;
  height: 50px;
  width: 50px;
  margin-bottom: 15px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div id="div-1" onclick="storeId(this);"&gt;
  &lt;/div&gt;
  
  &lt;div id="div-2" onclick="storeId(this);"&gt;
  &lt;/div&gt;
  
  &lt;div id="div-3" onclick="storeId(this);"&gt;
  &lt;/div&gt;
  
  &lt;div id="div-4" onclick="storeId(this);"&gt;
  &lt;/div&gt;
  
  &lt;input&gt;</code></pre>
  </div>
  </div>
  </p>