Welcome to the in5 Answer Exchange! This a place to get answers about in5 (InDesign to HTML5) and make requests.
0 votes
I have Text anchors set up and buttons from the top of a long page linking to the text anchors. When I click on the button, it initially goes to the anchor point, but then returns to the top of the page. Can you help to resolve this please?
in how_to by (210 points)
  
Do you have a link for us to see the issue? Also, if you could send us the InDesign file(s), we can take a closer look.
Hi there, yes please see the following test. file:///Volumes/Lime%20Work/Gaggenau/3747:3888%20The%20Differences/5.%20Artwork/LITE%20Version/Long%20page%20version/HTML/index.html I have discovered that if I just output the one page the links work OK, but if I output 5 pages it doesn't. I will try and add the indesign file here as well.
Hi please also see a link to download the InDesign file https://drive.google.com/file/d/1ymZrLxc42pc0jMI5uyWB4Xyn2oeTklfR/view?usp=sharing thanks
The link needs to be online somewhere for us to check. I'll take a look at the ID files in the meantime.
So sorry, I thought I was copying the URL from the test server rather than our local server. Please see here - http://approval.limecreative.com/gaggenau/differences/HTML/
the 3rd page is a contents page. Ovens is active and it is the subnav on this ovens page which does not seem to work.
Extractors links to an anchor point on the Heritage page and that one works. So we are bit confused as to why the links on the Ovens page do not work. Many thanks for your help.
Thanks for sharing the files. I'll take a look and get back to you.
A fix will be available in the next update.

Until then, you can attach the following as a .js file in the Resources section of the in5 export dialog:

$(window).load(function(){
    var $slider = $('#slider');
    var slider = $slider.data('AnythingSlider');
    nav.to = function(n,c){
        if(c){
            var offset = $slider.offset(), cScale = getCurrentScale($('#container'));
            slider.scrollAdjust = (pageMode=='h' || pageMode=='fade') ? function(){ $(document).scrollTop(offset.top+c[1]*cScale);} : function(){$(document).scrollLeft(offset.left+c[0]*cScale);};
        } else slider.scrollAdjust = undefined;
        if(n == slider.currentPage && slider.scrollAdjust){
            slider.scrollAdjust();
            delete slider.scrollAdjust;
        } else slider.gotoPage(n);
    };
});
That works, thanks!

1 Answer

0 votes
by (197k points)