0
I wonder how I can use javascript to perform the page change on the mobile touch screen, so that dragging left go to previous page and right to next page.
Currently I have this code below that uses the arrow keys of the keyboard, I wonder how I can complement this code with this additional function.
<script type="text/javascript">
document.onkeydown = arrowChecker;
function arrowChecker(e) {
e = e || window.event;
if (e.keyCode == "37") { //left
document.location.href = "/'.$UrlArray1.'/'.$UrlArray2.'/?leitor=fullpg10&paginainicial='.($inicioA).'&paginafinal='.($fimA).'&#iniciopg";
}
else if (e.keyCode == "39") { //right
document.location.href = "/'.$UrlArray1.'/'.$UrlArray2.'/?leitor=fullpg10&paginainicial='.($fim+1).'&paginafinal='.($fim+10).'&#iniciopg";
}
}
</script>
that helps? https://answall.com/questions/34149/howto determinar-a-dire%C3%A7%C3%a3o-do-touchmove only adapt to call the functions you already have
– Ricardo Pontual
That’s just what I wanted to thank you for.
– Striffer