I have a inner dev with a fixed height and overflow-y: scroll;
where the contents can be scrolled in y direction. When the scrolling hits the top or the bottom the outer div is scrolled. I want to prevent that.
<section id="concept" class="testimonials bg-black">
<div class="col-lg-12">
<div class="concept-frame">
</div>
</div>
</section>
I use following JavaScript:
$( ".concept-frame" ).scroll( function(e) {
console.log( "Scolling ..."+$(this).scrollTop() );
e.stopPropagation();
} );
But with no effect. How can I stop that the scrolling is propagated to the outer div?
the scroll event doesn't bubble so e.stopPropagation();
will not work
to prevent the scroll of the parent see:
Prevent scrolling of parent element?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With