title: Multiple selects change on div click
body: <p>I'm trying to have multiple selects changed on div click, the problem is that only the last clicked keeps selected, i'll be grateful if someone knows how to solve this.</p>
  
  <p><strong>Edit:</strong>
  Selects are dynamic, so i can't know how many there will be, therefore i can't give a class or id to them, the only data i have is the options values.</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>$("div").on("click", function() {
    $("select").val($(this).data("value"));
  });</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 data-value="1"&gt;1&lt;/div&gt;
  &lt;div data-value="2"&gt;2&lt;/div&gt;
  &lt;div data-value="3"&gt;3&lt;/div&gt;
  
  &lt;div data-value="a"&gt;a&lt;/div&gt;
  &lt;div data-value="b"&gt;b&lt;/div&gt;
  &lt;div data-value="c"&gt;c&lt;/div&gt;
  
  &lt;select&gt;
    &lt;option value="1"&gt;1&lt;/option&gt;
    &lt;option value="2"&gt;2&lt;/option&gt;
    &lt;option value="3"&gt;3&lt;/option&gt;
  &lt;/select&gt;
  &lt;select&gt;
    &lt;option value="a"&gt;a&lt;/option&gt;
    &lt;option value="b"&gt;b&lt;/option&gt;
    &lt;option value="c"&gt;c&lt;/option&gt;
  &lt;/select&gt;</code></pre>
  </div>
  </div>
  </p>