Edit in JSFiddle

<div style="border: 1px solid ;" id="divId" >Swipe Right - Please do not swipe outside the border!</div>
<div style="border: 1px solid ;" id="divId1" >Swipe Left - Please do not swipe outside the border!</div>
$("#divId").on("swiperight",function(){
  alert("You swiped right!");
});


$("#divId1").on("swipeleft",function(){
  alert("You swiped left!");
});