Reputation: 4966
I have turn.js set up similarly to the way you see here : http://demo.tutorialzine.com/2012/03/instagram-magazine-php-jquery/
I would like to have the top right corner of first page already bent in as if I had hovered over it as soon as the page is loaded.
I'm brand new to JS so looking at https://github.com/blasten/turn.js/wiki/Reference and taking a wild guess I wrote this
document.getElementById('magazine').onload = function()
{
$('#magazine').turn('tr', 1);
}
This of course doesn't do anything except embarrass me. Any ideas?
Upvotes: 1
Views: 2979
Reputation: 4842
Hope code would show "peeled" page when page loaded:
$('#magazine').turn({gradients: true, acceleration: true});
$('#magazine').turn('peel', 'br');
see reference:
http://www.turnjs.com/docs/Method:_peel
Upvotes: 0
Reputation: 70523
This is how you would set an option:
$(function()
{
$('#magazine').turn({ tr : 1 });
});
sadly tr is not an option so it won't help. I don't believe there is an option to do what you want to do.
Upvotes: 1