JSFiddle - React, Tailwind, and code Playground
HTML
<div id="container">
<div class="score">0</div>
<div class="score">0</div>
</div>
CSS
div.score {
font-size: 10em;
padding: 40px;
margin: 10px;
background-color: green;
width: 200px;
text-align: center;
}
JavaScript
$('#container').on('swipeleft swiperight', '.score', function(e) {
var $this = $(this);
setTimeout(function() {
$this.text( parseInt($this.text(), 10) + (e.type == 'swipeleft' ? -1 : +1) );
}, 1);
});