jQuery plugin to convert all the PDF links on your site to a flipbook magazine.
Usage steps:
1.-Include jquery and the plugin through a CDN or download and include them in your project:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.heyzine.com/release/jquery.pdfflipbook.1.js"></script>
2.-Call the plugin with the key to convert all the links:
$('a').pdfFlipbook({ key: 'd3m0' });
3.-Optionally, you can use DOM attributes to customize the resulting flipbook and presentation:
Parameter |
Required |
Description |
Example |
flipbook |
Optional |
When the element has an href, this attribute will be ignored, otherwise defines the url of the pdf file and binds a click event for navigation. |
<span flipbook="/link-to-pdf.pdf">This is a flipbook</span>
|
title |
Optional |
Title for the page |
<a flipbook="/link-to-pdf.pdf" title="title">This is a flipbook</a>
|
subtitle |
Optional |
Subtitle for the page |
<a flipbook="/link-to-pdf.pdf" subtitle="subtitle">This is a flipbook</a>
|
showdownload |
Optional |
Show the download button on the flipbook page |
<a flipbook="/link-to-pdf.pdf" showdownload>This is a flipbook</a>
|
showmodal |
Optional |
Opens the flipbook in a simple modal over the page |
<a flipbook="/link-to-pdf.pdf" showmodal>This is a flipbook</a>
|