<div id="element">Swipe me with two fingers!</div>
<script src="https://cdn.jsdelivr.net/npm/hammerjs@2.0.18/hammer.min.js"></script>
<script>
const element = document.getElementById("element");
const hammer = new Hammer(element);
hammer.get('swipe').set({ direction: Hammer.DIRECTION_ALL, threshold: 5, pointers: 2 });
hammer.on('swipe', function(ev) {
console.log('Two-finger swipe event detected!', ev);
});
</script>