turn.js
turn.js copied to clipboard
zoom, why it isn't in the js?
I'm having problem with zoom..
- i already tried jquery zoom, didn't make any difference...
- i had tried turn('zoon') i got
zoom is an invalid value - i tried the new zoom-viewport, got the
zoom is an invalid valueas well and then i think about looking how turn work with zoom and looked at https://github.com/blasten/turn.js/blob/master/turn.js and i realized that there's no zoom there... why?
my code is:
$('#flipbook').turn({
width: Math.round($('#flipbook canvas')[0].height * 1.4),
height: $('#flipbook canvas')[0].height,
autoCenter: true
});
$('#zoom-viewport').zoom({
flipbook: $('#flipbook'),
max: 3
});
$('#flipbook').click(function() {
var zoom = $('#flipbook').turn('zoom');
alert('Current zoom: '+zoom);
});
@CoderSquirrel I believe you have to include the zoom.js file separately. At least that's what I did to get zoom to work for me. On their website examples, when you look at the js files they are calling over the network, you can see that they are including it as a separate file from turn.js.
http://www.turnjs.com/lib/zoom.min.js