HI! Thanks!
I think you can do that by modifying the file single-flip_pong.php (in your theme directory).
The onclick is normally set on the zoom button, and it launch the JS function supazoomin().
I think you can put it on images, but I guess you’ll have to create a “toggle condition”: if the books is on normal scale, you zoom in, and if it’s on “zoomed-scale”, you un-zoom it (with the JS function supazoomout() ).
Thanks buddy, that’s what I did. And it worked. I’ll post here to help the next. Or even to help the next version.
<script>
$(“#flipbook”).click(function(){
$(this).toggleClass(function(index, classold, classtroca) {
if ( $( this ).is(“.semzoom”) ) {
supazoomin();
} else {
supazoomout();
}
});
});
</script>
Cool! Glad you succeed!
May I see the result ?
This is a project in production yet. It is being done locally. Once completed I will post here.
Inside the js folder is a file called script. In the end it has a code to supazoomin and supazoomout. What is the purpose?
/* function supazoomin(){
var supazoom = 1.5;
supazoom = $("#magazine").turn("zoom");
supazoom += 0.5;
$("#magazine").turn("zoom", supazoom);
var img = document.getElementsByClassName('flipbookimg');
for (var i = 0; i < img.length; i++) {
var width = img[i].width;
var width = (width*0.5);
img[i].width += width;
}
}
function supazoomout(){
var supazoom = 1.5;
supazoom = $("#magazine").turn("zoom");
if(supazoom <= 1){ return 0;}
supazoom -= 0.5;
$("#magazine").turn("zoom", supazoom);
var img = document.getElementsByClassName('flipbookimg');
for (var i = 0; i < img.length; i++) {
var width = img[i].width;
var width = (width*(1/3));
img[i].width -= width;
}
}*/
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]