title: Event listener for changing attribute in a div through javascript
body: <p>My div looks like the following:</p>
  
  <pre><code>&lt;div id="modal"
       style="position: fixed;
         left: 0px;
         top: 0px;
         width: 100%;
         height: 100%;
         opacity: 0.4;
         background-color: rgb(204, 204, 204);
         display: block;
         z-index: 99;"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want something to happen when my div changes to (note: display block has changed to none):</p>
  
  <pre><code>&lt;div id="modal"
       style="position: fixed;
         left: 0px;
         top: 0px;
         width: 100%;
         height: 100%;
         opacity: 0.4;
         background-color: rgb(204, 204, 204);
         display: none;
         z-index: 99;"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>I was thinking about a EventListener, does anybody have any idea how to get this working?</p>