title: How to block click event for the parent element in jQuery?
body: <p>I'm developing a web page using <code>jQuery</code>. In this web page, there is a div tag that contains a <code>p</code> and a <code>button</code> tag. </p>
  
  <p>The <code>HTML</code> code is like this:</p>
  
  <pre><code>&lt;div class="container"&gt;
      &lt;div id="attribute" style="border:solid;border-width:2px;border-color:#ccc"&gt;
          &lt;p id="cell-content" style="display:inline"&gt;Id&lt;/p&gt;
          &lt;button id="remark-view" class="btn btn-primary"&gt;Detail&lt;/button&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and the corresponding <code>JavaScript</code> code is like this:</p>
  
  <pre><code>$(document).ready(function(){
      $("#attribute").on('click', function(){
          console.log("click on the div attribute");
      });
      $("#attribute").on('dblclick', function(){
          console.log("double click on the div attribute");
      });
      $("#remark-view").on('click', function(){
          console.log("click on the button remark-view");
      });
  });
  </code></pre>
  
  <p>As the code shows, a outer div has a p and button child element, and the outer div element listens on the single click and double click event while the inner button element listens on the single click event. </p>
  
  <p>When I run the code in my browser and click on the button, the console shows that both click functions of the outer div and inner button element are called, which is against my purpose: only the click function of inner button should be called at this situation. Thus, is there any way to block the click event for the father element(in this case, outer div element).In other words, is there any way to stop passing the click event to the father element after the child element has handled it?</p>
  
  <p>Thank you in advance!</p>