title: onclick in javascript makes active in css
body: <p>I have a little content slider in css and I have two little points that change the image when they are in hover mode.</p>
  
  <p>My question is how can I make the slide stay active by onclick</p>
  
  <p>At the moment, my script looks like this but I think there is a problem with the <code>add</code>: </p>
  
  <pre><code>&lt;script&gt;
      function myFunction() {
          var button = document.getElementsByClassName("dia");
          button.classList.add('active');
      }
  </code></pre>
  
  <p></p>
  
  <p>thanks for helping</p>