keeping swipe up down as default using hammer

Pato2705

New Member
I'm using hammer js for swipe gestures on any mobile table. its a simple swipe left/right goto next/back.But what i want it up/down to remain as they are (scroll up/down).The code is pretty straightforward, the issues is when i do swipe up/down the page scroll up/down abnormally. At times it doesn't scroll at all or it scrolls a tiny bit up or down.\[code\]function hammerEvent( event ){ if(event.type == 'swipe' ){ if(event.direction == 'left'){ event.preventDefault(); document.location = gNext.href } if(event.direction == 'right'){ event.preventDefault(); document.location = gBack.href } }}\[/code\]Any one experienced this?
 
Back
Top