Welcome to the in5 Answer Exchange! This a place to get answers about in5 (InDesign to HTML5) and make requests.
0 votes
In our case we need to be able to swipe between groups of pages, lets say page 10 to 20, it must not be possible to swipe to page 9 or 21, as these belong to other groups that are accessible using buttons.

Is such a use case possible at all?
in how_to by (150 points)
  

1 Answer

0 votes
 
Best answer

You can disable specific pages by targeting the name of the page and adding it to the list of items excluded from swipe gestures.

For example, the following code would exclude pages 9 and 21 from swiping.

$(function(){
    $('#container').swipe({excludedElements:$.fn.swipe.defaults.excludedElements+=',.page[data-name="9"],.page[data-name="21"]'});
});

Adjust the example as needed.

Note that the string begins with a comma and each page selector is separated with a comma.

This code can be attached as a .js file in the Resources section of the in5 dialog.

by (197k points)
selected by
Prevent Swipe Navigation by Excluding Pages