I have a large chunk of content that is too big to break into small individual chapters. The problem however, is that animations on page X have already run by the time I get there. Obviously body onload="foo()" won't solve my problem. I need to be able to call foo() once I am on the page containing the canvas. Is there a way to do this? Perhaps fire an event on page turn?
2 Answers
This is solvable thing but I wonder whether the animation and this effect are so much important for the book. The problem is these things are typical for relatively highly tuned web pages and implementing them into a book could bring more problems than it would solve.
At the moment, eBook readers are often extremely memory-limited and it is suggested one chapter should have less than 300 KB!
If you were still interested in the solution, check this post.
I have tried adding of jQuery into ebooks and it worked pretty well but it is still very experimental practice (just for fun at the moment!).
This seems to be a limitation for animation in reflowable format. As soon as we hit the first page of the html, the whole document will load and the animation will be performed before we hit that particular page.
To stimulate this animation thru page turn script, we need to know the page number or the previous section id. But the fact, none of these parameters will work for us as the position of page will vary according to user settings.