title: how to disable or enable all onClick for images on a page
body: <p>When the user clicks on an image, I want the onClicks on all other images to be disabled until my function has finished.</p>
  
  <p>I currently have this code that disables them:</p>
  
  <pre><code>var eles = document.getElementsByTagName('img');
  for (var i=0; i &lt; eles.length; i++)
     eles[i].onclick = false;
  </code></pre>
  
  <p>but I'm not sure how to re enable them. I have tried:</p>
  
  <pre><code>var eles = document.getElementsByTagName('img');
  for (var i=0; i &lt; eles.length; i++)
     eles[i].onclick = true;
  </code></pre>
  
  <p>But its not working. anyone have solution for this problem</p>