title: Prevent click event from propagating/bubbling onto Google Maps
body: <p>I am using the MarkerClusterer library for Google Maps API V3 to group nearby markers into a single marker. When the user clicks on the cluster marker, a div appears beside that cluster marker. Now I want to make it such that after clicking on the cluster marker, to close the div that popped up, he can click on the map.</p>
  
  <p><strong>Problem:</strong> After adding a <code>google.maps.event.addListener(map, 'click', function(){})</code> on the map, when the user clicks on the cluster marker to open the popup div, nothing happens!! I'm guessing the click event on the cluster marker caused the div to popup, but the click event also propagated to the map, triggering the map's click listener to close the popup.</p>
  
  <p>I wish i can use jQuery's <code>event.stopPropagation()</code> but where can I get the <code>event</code> object?</p>
  
  <p>How can I solve this problem? How can I prevent the click from propagating through the cluster marker to the map? Hopefully the solution is cross-browser compatible.</p>
  
  <p><strong>JS Code</strong></p>
  
  <pre><code>clusterclickListener = google.maps.event.addListener(mc, "clusterclick", function (cluster) {
      $('#content_container').show();
  });
  
  google.maps.event.addListener(map, 'click', function() {
      $('#content_container').hide(); 
  });
  </code></pre>