Swipe Navigation
From NimbleKit
NKMoveToPageAnimated("page-to-go-to.html","PushRight");
This code goes into the Head of the file:
<script>
function OnTouchStart(event)
{
var touch = event.touches[0];
initialTouchPosition = touch.pageX;
}
function OnTouchEnd(event)
{
if (((lastPosition-initialTouchPosition)) > 300)
{
NKMoveToPageAnimated("page-to-go-to.html","PushRight");
}
}
function OnTouchMove(event)
{
var touch = event.touches[0];
lastPosition = touch.pageX;
}
</script>
<body ontouchmove="OnTouchMove(event);" ontouchstart="OnTouchStart(event);"ontouchend="OnTouchEnd(event);"]]>
