title: How to display elements with identical class with button in html/js
body: <pre><code>&lt;button class=&quot;edit&quot;&gt;EDIT PROFILE&lt;/button&gt;
  </code></pre>
  <pre><code>&lt;div class=&quot;display&quot;&gt;
  &lt;input  type=&quot;file&quot; name=&quot;profpic&quot; accept=&quot;image/png, image/jpeg&quot; 
  style=&quot;max-width:480px;max-height:480px;&quot;&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I have few elements with class <strong>display</strong> and i want them to be displayed <strong>together</strong> with single button, but i can't find solution.</p>
  <pre><code>let btn = document.querySelector('.edit');
  let prof = document.querySelectorAll('.display');
  btn.onclick = function(){
    prof.classList.toggle(&quot;edited&quot;);
  };
  </code></pre>
  <p><em>ofc css class <strong>display</strong> is set to <strong>none</strong> and <strong>edited</strong> is set to <strong>flex</strong></em></p>