Hi there,
So I finally got to the bottom of this.
To make this work I had to edit flipbook.min.js.
I’ll send you that altered file via PM. Put it in your project directory (replacing the one which is already there).
Then, from now on, as long as the “lightbox” option is set to “true”, you will be able to initialize the flipbook from a link with the id “startFlipBook”.
Here’s a demo.
Here’s the example code:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FlipBook initialize with link</title>
</head>
<body style="background: url('images/patterns/ecailles.png');">
<div id="container" style="margin: 20px;">
<a href="#" id="startFlipBook">Click here to launch the mighty FlipBook</a>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<script src="js/three.min.js"></script>
<script src="js/flipbook.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#container").flipBook({
css:"css/white.css",
pages:[
{src:"images/book2/page1.jpg", thumb:"images/book2/thumb1.jpg", title:"Cover"},
{src:"images/book2/page2.jpg", thumb:"images/book2/thumb2.jpg", title:"Page two"},
{src:"images/book2/page3.jpg", thumb:"images/book2/thumb3.jpg", title:"Page three"},
{src:"images/book2/page4.jpg", thumb:"images/book2/thumb4.jpg", title:""},
{src:"images/book2/page5.jpg", thumb:"images/book2/thumb5.jpg", title:"Page five"},
{src:"images/book2/page6.jpg", thumb:"images/book2/thumb6.jpg", title:"Page six"},
{src:"images/book2/page7.jpg", thumb:"images/book2/thumb7.jpg", title:"Page seven"},
{src:"images/book2/page8.jpg", thumb:"images/book2/thumb8.jpg", title:"Last"}
],
lightBox:true,
lightboxMargin:0,
lightboxPadding:0,
lightboxTransparent:true,
webgl:true,
pageFlipDuration:2,
pageMaterial:'phong',
zoom:.7
});
})
</script>
</body>
</html>
Sorry that we had to hack the plugin to make it do what you want.
If we weren’t dealing with such a huge lump of minified JavaScript, we could have done this much more elegantly.