title: TypeError: e is undefined - javascript
body: <p>All other browsers work perfectly fine. However, when firefox tries to execute this code:</p>
  
  <pre><code>if (!e) var e = window.event;
  e.cancelBubble = true;
  if (e.stopPropagation) e.stopPropagation();
  </code></pre>
  
  <p>it crashes and the console displays the following error:
  TypeError: e is undefined</p>
  
  <hr>
  
  <p>edit 1: </p>
  
  <pre><code>function clickInactiveTab() {
      $(this).attr({class: "activeTab"});
  
      $(".inactiveTab").hide();
  }
  
  function clickX() {
      $(this).parent().attr({class: "inactiveTab"});
      $(".inactiveTab").show();
  
      if (!e) var e = window.event;
      e.cancelBubble = true;
      if (e.stopPropagation) e.stopPropagation();
  }
  </code></pre>
  
  <p>What it does it, change the style of a div when clicked and hides all other divs from the class. When someone clicks the x that's inside the div, it should change the style back and show the hidden divs.</p>