PDA

View Full Version : Customization of page turning script turn.js (javascript)



ranger
05-05-2015, 10:08 AM
I'm looking at this book pages turning script:
www.turnjs.com/#samples/magazine1
There are many options for customization, however it seems there isn't an option for what I want to do.

The way it is now, in order to turn a page, you have to hover somewhere near the corners.
Only then the page corner turns and you somehow guess that by clicking you can go to the next page.

What I want is to make all the area clickable; wherever the mouse hovers, inside the book, one corner or another should bend.
The size of turning corner is OK like that, no need to modify.
I know I may have to edit the code directly somewhere, but I couldn't find the place although I tried.
It seems all css for page turning is inside turn.js file

If somebody can find the code line to be edited, please let me know.
Thanks

Beverleyh
05-05-2015, 01:59 PM
There is a .next-button and a .previous-button in the CSS that sit vertically down the edges of each page. You could increase the width of those (from 22px), change the left and right positioning and set their z-index to something high like 999, to make them sit atop the page.

Using Dev Tools (F12) should help you find the elements to edit more easily.

ranger
05-15-2015, 12:10 PM
Thanks, I tried but it doesn't work...
To be more precise, I'm looking for the code line where the size of the corner is defined. It could be in the library, I don't know why I can't find it..

ranger
05-18-2015, 07:42 AM
I could find the cornerSize:100 in the turn.min.js file,
but even if I change it to 200 or 300, for some reason the situation on the page doesn't change- the click-able size stays the same.
Why is that so....?