title: How to stop scroll event from propagating with javascript?
body: <p>Lets take this simple example:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="A"&gt;
      &lt;div id="B"&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When user moves mouse to the element B and starts to scroll, the element A should not get scroll event. How to disable scroll event from propagation?</p>
  
  <p>EDIT:
  I've tried this js code and it does not work. Any ideas?</p>
  
  <pre><code>document.getElementById("B").scroll = function(e) {e.stopPropagation();}
  </code></pre>