Booklet
jQuery Plugin - display web content in a flipbook
Install / Use
/learn @builtbywill/BookletREADME
jQuery Booklet Plugin
| :exclamation: This project is no longer under active development and has been archived. You can use as-is or fork the project to make changes. | |-----------------------------------------|
Booklet is a jQuery tool for displaying content on the web in a flipbook layout. It was built using the jQuery library. Licensed under both MIT and GPL licenses.
For detailed documentation and information, visit http://www.builtbywill.com/booklet/. Below is some basic information to get you started.
Installation
To install jQuery Booklet into your webpage, first include jQuery, jQuery UI (optional), jQuery Easing and the booklet CSS and JS files.
// CSS
<link href="booklet/jquery.booklet.latest.css" type="text/css" rel="stylesheet" media="screen, projection, tv" />
// jQuery
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script> window.jQuery || document.write('<script src="booklet/jquery-2.1.0.min.js"><\/script>') </script>
// jQuery UI (optional)
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<script> window.jQuery.ui || document.write('<script src="booklet/jquery-ui-1.10.4.min.js"><\/script>') </script>
// Booklet
<script src="booklet/jquery.easing.1.3.js" type="text/javascript"></script>
<script src="booklet/jquery.booklet.latest.min.js" type="text/javascript"></script>
The target that will become your booklet should simply be a container with multiple children. All first level children will become pages inside of the booklet.
<div id="mybook">
<div>
<h3>Yay, Page 1!</h3>
</div>
<div>
<h3>Yay, Page 2!</h3>
</div>
<div>
<h3>Yay, Page 3!</h3>
</div>
<div>
<h3>Yay, Page 4!</h3>
</div>
</div>
Once you have the files included and the structure created, you can initialize the booklet.
$(function() {
//single book
$('#mybook').booklet();
//multiple books with ID's
$('#mybook1, #mybook2').booklet();
//multiple books with a class
$('.mycustombooks').booklet();
});
Documentation
Options
Options can be set either with an init object, or afterwards with a setter function. Also, you can get the value of an option as well. To see all available options, see the Documentation
//init
$(".selector").booklet({ width: 500 });
//getter
var width = $(".selector").booklet("option", "width");
//setter
$(".selector").booklet("option", "width", 600);
Events
The following events are triggered when using a booklet.
- bookletcreate
- bookletstart, bookletchange
- bookletadd, bookletremove
Each event returns a data object which contains data related to the event. Common to all events are:
- data.options - the current booklet options at time of the event (read-only)
- data.index - zero-based index of the currently visible page spread
Only available for bookletcreate, bookletstart and bookletchange events:
- data.pages - an array of elements, the two currently visible pages
Only available for bookletadd and bookletremove events:
- data.page - element, the page that was either just added or just removed
You can bind your callbacks to events either at init, or using the event type. To see all available events, see the Documentation
//init
$(".selector").booklet({
create: function(event, data) { ... }
});
//event type
$(".selector").bind("bookletcreate", function(event, data) {
...
});
Methods
The methods available for each booklet can be called on one or more booklets at the same time. Methods which return a value, such as an option, when called on more than one selector will return an array of values. Otherwise, the chainability of the elements will be maintained.
//destroys the booklet
$(".selector").booklet("destroy");
// get a single returned option
var val = $("#selector").booklet("option", "width");
// get an array of returned options (for multiple booklets)
var val = $(".selector, .selector2").booklet("option", "width");
To see all available methods, see the Documentation
Style
Once the booklet is created, the basic generated structure and CSS will appear below.
If more customization is desired, all generated classes are visible in the current jQuery Booklet stylesheet.
<div class="booklet" id="mybook">
<div class="b-page b-page-0 b-p1">
<div class="b-wrap b-wrap-left">
...
</div>
</div>
<div class="b-page b-page-1 b-p2">
<div class="b-wrap b-wrap-right">
...
</div>
</div>
<div class="b-page b-page-2 b-p3">
<div class="b-wrap b-wrap-left">
...
</div>
</div>
<div class="b-page b-page-3 b-p4">
<div class="b-wrap b-wrap-right">
...
</div>
</div>
<div class="b-controls">
...
</div>
</div>
Related Skills
qqbot-channel
343.3kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
docs-writer
99.7k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
343.3kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
project-overview
FlightPHP Skeleton Project Instructions This document provides guidelines and best practices for structuring and developing a project using the FlightPHP framework. Instructions for AI Coding A
