3D FlipBook - Trigger Fullscreen via a button? Callback?
s***e@ir3w.com
2024-09-12
2024-09-12
Is there any way I can trigger Fullscreen (cmdFullScreen) via a button elsewhere on the page? A callback or something like that?
Note: I would assume if this can be done, it would be done via jQuery (which I am very familiar with).
Replies
a***r@3dflipbook.net
2024-09-12
2024-09-12
There are several ways to do this:
1.
[3d-flip-book mode="link-lightbox" id="1" classes="fb3d-button,fb3d-activate-fullscreen"]Book #1[/3d-flip-book]
2.
[3d-flip-book mode="link-lightbox" id="1" classes="fb3d-activate-fullscreen" trigger="start-book1"][/3d-flip-book]
<button class="start-book1">Start Book #1</button>
3.
Use next book ready function in the book editor:
function ready(scene) {jQuery('.start-book1').click(function(){scene.ctrl.cmdFullScreen()})} ready
Then insert this book
[3d-flip-book id="1"][/3d-flip-book]
<button class="start-book1">Start Book #1</button>
s***e@ir3w.com
2024-09-18
2024-09-18
Thanks!
I rad through the docs and must have missed these methods. [I'll try them out later today.]
s***e@ir3w.com
2024-09-18
2024-09-18
More questions:
Using solution 3, I'm not seeing any errors, but is that "ready" hanging off of the end required?
Also, does this code have to be in the Flipbook Ready function, or can it go in the main flipbook settings ready code, or could it even reside in a .js file completely separate from the Flipbook plugin?
a***r@3dflipbook.net
2024-09-18
2024-09-18
The plugin executes the book ready function first, then global one. So it depends on what you need. If you use for single book it should looks like this: https://paste.pics/c69f640bd55d5cff9133a9e1062e9fda
There are several ways to do this:
Thanks!
I rad through the docs and must have missed these methods. [I'll try them out later today.]
More questions:
Using solution 3, I'm not seeing any errors, but is that "ready" hanging off of the end required?
Also, does this code have to be in the Flipbook Ready function, or can it go in the main flipbook settings ready code, or could it even reside in a .js file completely separate from the Flipbook plugin?
The plugin executes the book ready function first, then global one. So it depends on what you need. If you use for single book it should looks like this: https://paste.pics/c69f640bd55d5cff9133a9e1062e9fda