Welcome to the in5 Answer Exchange! This a place to get answers about in5 (InDesign to HTML5) and make requests.
0 votes
Hi Justin,

Related to this question, if I want only the first page to be allowed to swipe but the rest of the pages don't, how would you recommend to write the code?
related to an answer for: Block pages from swipe
in how_to by (350 points)
  

1 Answer

0 votes
 
Best answer

You can modify the page filter thusly:

.page[data-name!="1"]

"!=" means "not equal to"-- so it will exclude all pages except the first one.

Here's the entire snippet from the other post with the adjustment:

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

by (197k points)
selected by
Thank you so much Justin.

Just to confirm, I enter this code in the JavaScript area in the resources tab of the In5 window, correct?
Hi Justin, I tested the .js file with the code you gave me and it works like a charm!!!

Thank you so much!

You never cease to amaze me with all your great support and your always prompt response.

Keep up the good work! Our company is loving the In5 tool!

Ed
Happy to help, Ed!

So glad to hear that your company is loving in5. :-)