• Register
Welcome to the in5 Answer Exchange! This a place to get answers about in5 (InDesign to HTML5) and make requests.
0 votes
I'm trying to export an indesign document which has been made in different layouts(columns). The purpose for this is to be able to swipe through articles (right/left) and through pages within the article (down/up). I want to do this for baker framework (HPUB). I've exported the articles with its pages separately, article by article with a vertical swipe for web. And I've also exported the article main pages for HPUB with a horizontal swipe navigation. Then I have replaced the HPUB pages with the articles' htmls. Now I know I am dealing with a JavaScript problem. How can I make a .js file in wich vertical swipe navigation works for the article's pages and the horizontal swipe to navigate through the article's main page?
in how_to by (160 points)
    

1 Answer

+1 vote
 
Best answer

I'm not sure I completely understand the setup, but perhaps this will help. With the touchSwipe library, adding the allowPageScroll property may allow the swipe gestures to "pass through" to the desired element.

...container.swipe({
            allowPageScroll:'vertical',
            swipe:function...

I would try allowing 'vertical' on the files that use horizontal swiping, and 'horizontal' on the files that use vertical swiping.

Documentation: http://labs.rampinteractive.co.uk/touchSwipe/demos/Page_scrolling.html

by (183k points)
selected by
First of all thankyou Justin for answering my question.
I´m really new to javascript and not and expert definetelly in html.
What i´m really doing is exporting like an index for hpub for horizontal mode of all the first pages of the articles. Then I export a whole article for web (one .html file). Then I substitute an html file of the hpub with the one file html exported for web of the whole article.
The problem here (i think) is that the scrolling is being identified for  ' class="page" ' So i maybe have to identify the article scrolling to some other attribute so the left/right page swiping works for the 'class="page", and the up/down page swiping works for this other assigned 'class="page2?".. Does it makes sense what i want to do???
I'm still not quite clear. Is is possible to diagram the idea or show an example?
the allowPageScroll code is now automatically part of the in5 code (as of version 1.4.18).
Hey @anxo did you ever get this to work? I'm trying to do the same thing?