Fork Notice
Aiming to turn codrops awesome work into an easy to use package!
Testing 1 2 3
git clone https://github.com/paxperscientiam/BookBlock
cd BookBlock
pnpm i && pnpm run build && pnpm run serve
# or, if you have serve installed
serve dist
With the above, fuse-box
should start a server.
BookBlock
A jQuery plugin that will create a booklet-like component that let's you navigate through its items by flipping the pages.
article on Codrops
demo
License: http://tympanus.net/codrops/licensing/
BookBlock Configuration Options
startPage : 1,
orientation : 'vertical',
direction : 'ltr',
speed : 1000,
easing : 'ease-in-out',
shadows : true,
shadowSides : 0.2,
shadowFlip : 0.1,
circular : false,
nextEl : '',
prevEl : '',
autoplay : false,
interval : 3000,
onEndFlip : function(old, page, isLimit) { return false; },
onBeforeFlip : function(page) { return false; }
Usage
Example (see example for more info)
<div>
<h3>Illustrations by <a href="http://dribbble.com/kevinhowdeshell">Kevin Howdeshell</a></h3>
<div id="bb-bookblock" class="bb-bookblock">
<div class="bb-item">
<a href="#"><img src="images/demo1/1.jpg" alt="image01"/></a>
</div>
<div class="bb-item">
<a href="#"><img src="images/demo1/2.jpg" alt="image02"/></a>
</div>
</div>
<nav class="bb-nav-container">
<a id="bb-nav-first" href="#" class="bb-nav bb-icon bb-icon-first">
First page</a>
<a id="bb-nav-prev" href="#" class="bb-nav bb-icon bb-icon-arrow-left">Previous</a>
<a id="bb-nav-next" href="#" class="bb-nav bb-icon bb-icon-arrow-right">Next</a>
<a id="bb-nav-last" href="#" class="bb-nav bb-icon bb-icon-last">Last page</a>
</nav>
</div>
<script>
$(function () {
const sexy = $( "#bb-bookblock" ).bookBlock({
_dummy: true,
circular: true,
height: "300px",
width: "400px",
})
});
</script>