title: Ignore parent onclick when child onclick is clicked, using Javascript only
body: <p>An good example of what im trying to do is, think of instragram. When you are click on a photo, it opens a window with that photo plus the grey background. If you click anywhere in the grey background the picture is closed, however if you click on the picture the picture remains in the window.</p>
  
  <p>This is what I am trying to achieve with this:</p>
  
  <pre><code>&lt;div class="overlay_display_production_list_background" id="overlay_display_production_list_background_id" onclick="this.style.display = 'none'"&gt;
      &lt;table class="table_production_availability" id="table_production_availability_id" onclick="this.parentElement.style.display = 'block'"&gt;
      &lt;/table&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>However this doesnt work. how do I get this working, I only want Purely java-script. </p>
  
  <p>Thanks </p>