The following example displays the imBookFlip plugin using the autoFlip option (automatic page turning) set to 'click'.
When set to 'click', auto flip (and sound) will begin after the user clicks on the first page (the book cover). I have also set the autoFlipSpeed to 5000 (default 7000).
I also used the sound_manager option, so turn on your speakers to hear the audio.
Because I use floats for the demo pages, this example uses the iframe option. View the 'Fixed Position' example see how to create the plugin without an iframe.
Remember, the book pages are set to an absolute position (position:absolute) so you must use absolute positioning for all siblings of the book's parent container.
$(document).ready( function() {
var myBook = $("#iframeCntnr").imBookFlip({
page_class: 'imBookPage',
autoFlip: 'click',
autoFlipSpeed: 5000,
sound_manager: {swf_loc: 'assets/js/soundmanager/soundmanager2.swf', audio_loc: 'assets/js/jquery/imbookflip/StarGate-SG1.mp3'},
iframe: {src: 'assets/iframesrc/book.php', book: 'myBook'}
});
myBook.create();
});
View the source for this page to see how to setup the plugin. For documentation about the imBookFlip plugin, view the blog post.