title: How to make an image change into others on click?
body: <p>I'm trying to make a sort of a minimal clickable "slideshow". So far I have only managed to make the image change into another. but I want to add other images to it. I tried to add other ifs and elses on the javascript but it doesn't work. (I'm a noob...) How can I do it? I juts want to click and the images change. This is my code so far:</p>
  
  <pre><code>&lt;div&gt; &lt;img alt="" src="1.jpg" id="imgClickAndChange" onclick="changeImage()"/&gt; &lt;/div&gt;
  
  
  
  &lt;script language="javascript"&gt;
  function changeImage() {
  
      if (document.getElementById("imgClickAndChange").src = "1.jpg") 
      {
          document.getElementById("imgClickAndChange").src = "2.jpg";
  
          document.getElementById("imgClickAndChange").src = "3.jpg";
      }
  
   }
  &lt;/script&gt;
  </code></pre>
  
  <p>thank you!</p>