You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm currently using TouchSwipe (version 1.6.18) to toggle controls inside the iOS app by single tap vs app's double-tap (sorry, none of the formatting options for code worked):
<script>
$(document).ready(function() {
$("body").swipe( { // this code to support toggleBars on single tap
tap:function(event, target) {
if ($(target).hasClass('baker-prevent-navigation') || $(target).hasClass('swiper-pagination-bullet') ||
$(target).prop('tagName').toLowerCase() == 'area' || $(target).parents('area').length > 0) {
return;
}
window.location.href = 'book://toggleBars'; // toggleBars is case-sensitive!!!
},
threshold:5
});
});
</script>
Now on some pages I need to disable supported by the app swiping between the pages. This code disables the very 1st swipe, but not the consecutive:
$(function() {
//Enable swiping...
$("#test").swipe( {
swipeStatus:function(event, phase, direction, distance, fingerCount) {
var str = "";
switch (phase) {
case "start" : str="Started"; break;
case "move" : str="You have moved " + distance +" pixels, past 200 and the handler will fire"; break;
case "end" : str="Handler fired, you swiped " + direction; break;
case "cancel" : str="cancel handler fired"; break;
}
$(this).text(str);
//This will cancel the current swipe and immediately re run this handler with a cancel event
return false;
}
});
});
Could someone please help on how to make it work after the 1st time and how to add that additional code inside already working code for tap?
Thanks a lot!
The text was updated successfully, but these errors were encountered:
Hi,
<script> $(document).ready(function() { $("body").swipe( { // this code to support toggleBars on single tap tap:function(event, target) { if ($(target).hasClass('baker-prevent-navigation') || $(target).hasClass('swiper-pagination-bullet') || $(target).prop('tagName').toLowerCase() == 'area' || $(target).parents('area').length > 0) { return; } window.location.href = 'book://toggleBars'; // toggleBars is case-sensitive!!! }, threshold:5 }); }); </script>I'm currently using TouchSwipe (version 1.6.18) to toggle controls inside the iOS app by single tap vs app's double-tap (sorry, none of the formatting options for code worked):
Now on some pages I need to disable supported by the app swiping between the pages. This code disables the very 1st swipe, but not the consecutive:
$(function() {
//Enable swiping...
$("#test").swipe( {
swipeStatus:function(event, phase, direction, distance, fingerCount) {
var str = "";
switch (phase) {
case "start" : str="Started"; break;
case "move" : str="You have moved " + distance +" pixels, past 200 and the handler will fire"; break;
case "end" : str="Handler fired, you swiped " + direction; break;
case "cancel" : str="cancel handler fired"; break;
}
Could someone please help on how to make it work after the 1st time and how to add that additional code inside already working code for tap?
Thanks a lot!
The text was updated successfully, but these errors were encountered: