Strange turn.js behavior

446 views Asked by At

I'm doing simple magazine project wuth turn.js but am experiencing strange behaviour.

My JS:

var pageWidth = 280;
var pageHeight = 400;


$('.magazine img').each(function(index, element) {
    $(this).width(pageWidth);
    $(this).height(pageHeight);
});
$('.magazine').turn({
    width: pageWidth*2,
    height: pageHeight,
    when:{}
});

$('.magazine-viewport').zoom({
    flipbook: $('.magazine'),
    max: 3,
    when:{
        tap: function(event){
            if ($(this).zoom("value")==1) {
                $(this).zoom("zoomIn", event);
            } else {
                $(this).zoom("zoomOut");
            }
        }
    }
});

When the user taps on .magazine, it zooms and then disappears.

0

There are 0 answers