in5 Main Page
in5 Customer Stories
in5 Account Login
in5 (Interactive InDesign)
in5 Online Account Login
Ajar Academy Video Courses
Digital Publishing Course
InDesign UX Resources
Welcome to the in5 Answer Exchange! This a place to get answers about in5 (InDesign to HTML5) and make requests.
Ask a Question
Which event listener to use for detecting a page being travelled away form in Web Slider format.
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.
to add a comment.
to answer this question.
I'm glad that you were able to get it to work how you wanted. Thank you for letting us know.
to add a comment.
Welcome to in5 Answer Exchange, where you can ask questions and receive answers about
from other community members.
Link to a specific page using the Slider Page Format
How can I make a Table of Contents page for a multi-page publication to then export it in flipping mode?
How can use a simple e-mail form in in5
Jump to Object when page format is set to slider
Automated deep links to specific pages in web-format
Most popular tags
© Ajar Productions 2004-2023, All rights reserved.