title: Work with event.stopPropagation() on firefox and IE
body: <p>Why doesn't this code work for Firefox and IE? 
  It's fine on chrome.</p>
  
  <pre><code>$(document).click(function(e) {
      if ($(".contentIconDesk").hasClass('markIconDesk')) {           
          $(".contentIconDesk").removeClass('markIconDesk');          
          wndSelected = "";   
      }       
  });
  
  function markMe(icon, wnd) {
      event.stopPropagation();            
      if ($('#'+icon).hasClass('markIconDesk')) {
          $(".contentIconDesk").removeClass('markIconDesk');
          wndSelected = "";               
      } else {
          $(".contentIconDesk").removeClass('markIconDesk');
          $('#'+icon).addClass('markIconDesk');
          wndSelected = wnd;                  
      }       
  };
  </code></pre>
  
  <p>The function <code>MarkMe();</code> is called in the event <code>onClick()</code> of some div in my HTML. The problem is with the <code>event.stopPropagation()</code>. When I click to add the class, the browser catch the click on <code>$(document)</code>.</p>
  
  <p>If there is a good suggestion instead of using the code above, it will be great.</p>