JSFiddle - React, Tailwind, and code Playground

HTML

<div id="whole">
    <p>Whole event: <span id="whole-result"></span></p>
    
    <div id="child">
        <p>Child event: <span id="child-result"></span></p>
    </div>
</div>

CSS

#whole {
    position: relative;
    width: 400px;
    height: 400px;
    background-color: lightgreen;
    border: 1px dashed red;
    
    -webkit-touch-callout: none;
    -webkit-user-select: none;
}

#child {
    position: absolute;
    top: 50px;
    left: 50px;
    bottom: 50px;
    right: 50px;
    background: lightyellow;
    border: 1px dashed red;
}

JavaScript

$('#whole').bind('swipeLeft swipeRight', function () {
    $('#whole-result').text(event.type + ', ' + new Date());
});

$('#child').bind('swipeLeft swipeRight', function(event) {
    $('#child-result').text(event.type + ', ' + new Date());
    event.stopPropagation();
});