turn.js icon indicating copy to clipboard operation
turn.js copied to clipboard

how to add or remove a page dynamically?

Open zhangzhzh opened this issue 14 years ago • 5 comments

I tested to add a div in the div with class of magazine, but can't see the added div.

zhangzhzh avatar Mar 26 '12 12:03 zhangzhzh

Additionally, I found after the magazine was created, it couldn't be scrolled because although the page was scrolled but the flip button still stayed in old position.

zhangzhzh avatar Mar 26 '12 12:03 zhangzhzh

Hello, this week a new release of turn.js will include this feature.

blasten avatar Mar 26 '12 16:03 blasten

Hi, I'm not sure if this is the same issue as I am having, but I thought this post was the mostr appropriate one to add it to. I have a book that is likely to be 1000+ pages long, so I would prefer not to add all the divs at once, but instead load them in as I need to based on people turning the pages (maybe staying a couple of pages ahead of them so that page turns still look right). Is this currently possible? I can capture the page turn event I see, but cannot find a way to get the already loaded book to recognise the div I have added for the new page.

I may also not load the pages contiguously, for instance the user may read pages 1,2,3,4,5, and then skip to page 100. At that point maybe I load in pages 98-102 (for example), and if they page back to 98 I would need to load 95-97 etc. I appreciate that this may be a somewhat specialist requirement as most books would be small, but any book of size would probably benefit from loading the pages in asynchronously.

Thanks, Peter.

ghost avatar Mar 27 '12 11:03 ghost

Agree with Peter. Even a 10-20 pages book/magazine can be "heavy" with content and dynamic loading would definitely help, especially on mobile devices/slow connections.

cipnt avatar Mar 27 '12 19:03 cipnt

https://github.com/blasten/turn.js/wiki/Top-features-for-the-next-release-1.1.2

Dynamic pages

that sounds good :-)

FlashJunior avatar Mar 28 '12 05:03 FlashJunior