title_body: Epub3 run js function on page turn event 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?
upvoted_answer: 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!).