title: Disable or enable an html5 image with javascript
body: <p>I want to disable all images of my game by using enable or disable function, but it does not works!
  can you help me with this? I have no idea how to disable or enable onclick function on a single image</p>
  
  <p>Tryed this:</p>
  
  <pre><code>&lt;div&gt;&lt;img id="red" src = "rojo.png" onclick="setColorRojo()"/&gt;&lt;/div&gt;
  
  function enable(){
          document.getElementById("red").disabled = false; 
  
  
      }
  
      function disable(){
          document.getElementById("red").disabled = true;
  
      }
  </code></pre>