Welcome to the in5 Answer Exchange! This a place to get answers about in5 (InDesign to HTML5) and make requests.
0 votes
I've been refactoring my code to switch from multi-page web to slider web, and i've noticed the newPage and beforeNewPage events being used to detect a change in pages in the in5config file, but i can't find documentation anywhere about them or references defining those events, are they custom events? if so what event should i be using if want to pull some data from the page being navigated away from? Previously i was using $(window).on("pagehide"... to grab the page number of the page being traveled from but thats not the same event in the single page version. I've tried $(window).on("beforeNewPage"... but it doesn't trigger as i thought it might.

Edit: I've also tried $('#slider').on('slide_init', ... which didn't work, but when i added a console log to the in5config file within the $slider.on('slide_init',... event handler i get the console log, and seemingly when i want it to trigger.

Edit 2: Nevermind i got it, i had to make sure the function listening for 'slide_init' was only added after the document was ready, i adding the event listener before the slide_init was defined by the jquery.anythingslider.min.js was loaded.
in how_to by (450 points)
edited by

1 Answer

0 votes
I'm glad that you were able to get it to work how you wanted. Thank you for letting us know.
by (25.4k points)