Question

i am using turn.js (a script that makes a pape flipping effect) to publish my articles online, but i want to add an index with clickable links that jumps to a specific page

I've searched for my question here and the closest one is Turn.js more controls to make buttons

The answer was: $("#magazine").turn("page",4) // goto page number 4 Reference: http://www.turnjs.com/#samples/docs/18

Well i don't know where to put it and make it an action for a clickable link

sorry for the novice question i'm a graphics designer and a poet but i'm totally new to javascript coding

Thanks for your time

Was it helpful?

Solution

I don't know turn.js but you can try making a link which calls javascript as follows :

    <a href="javascript:$('#magazine').turn('page',4)">Index term</a>

Make your index a list of such links setting appropriate values for the page number and index term. A quick scan of the documentation showed no reason why this would not work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top