First, example js code:
$(function(){
$('body').click(function(){alert('body clicked');});
$('body').on('click','.post-header',function(e){
e.stopPropagation();
$(this).next('.post-content').slideToggle();
})
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<body>
<div class="post-wrapper">
<h2 class="post-header">Lorem Ipsum</h2>
<div class="post-content">
<p>Lorem Ipsum is simply dummy text of....</p>
</div>
</div>
</body>
My question is, if e.stopPropogation() kills the bubbling towards body, how come the click event hits the body and triggers handler to run the slide code?