How to make flip book with turn.js library

  • Tech Area
  • August 24, 2023



In this tutorial, We will learn how to create flip book with html using turn.js library. Turn.js is a JavaScript library that will make your content look like a real book or magazine.

Below are the step by step process of how to create flip book using turn.js library.

Step 1: Download turn.js library

Click on below link to download turn.js library.

http://www.turnjs.com/

Step 2: Extract File

After successfully download, right click on the file and click extract all.

After successfully extract, you will find extras, lib and samples folder within turnjs4 folder.

Step 3: Copy File from magazine directory

In this step, copy all file from magazine folder which placed under samples folder and paste into turnjs4 folder.

Step 4: Edit index.php

<head>
<title>Using turn.js and the new zoom feature</title>
<meta name="viewport" content="width = 1050, user-scalable = no" />
<script type="text/javascript" src="extras/jquery.min.1.7.js"></script>
<script type="text/javascript" src="extras/modernizr.2.5.3.min.js"></script>
<script type="text/javascript" src="lib/hash.js"></script>
</head>

// The number of pages

pages: 12,   //Define the number of pages

yepnope({
	test : Modernizr.csstransforms,
	yep: ['lib/turn.js'],
	nope: ['/lib/turn.html4.min.js'],
	both: ['/lib/zoom.min.js', 'js/magazine.js', 'css/magazine.css'],
	complete: loadApp
});


Subscribe us via Email

Join 10,000+ subscriber

Subscribe on YouTube