How to create page flip effect using jQuery
Features:
- Uses Hardware acceleration
- Works on tablets and smartphones
- Easy to manipulate
- Lightweight, only 6K
First a DEMO:
Just take the mouse either on top-right corner or bottom-right corner and click to see the page flip effect.
Code:
All you need to do is declare a div element and use the CSS to set the height, width and color of the element.
//Code Starts ?#magazine { width:800px; height:400px; } #magazine .turn-page { width:400px; height:400px; background-color:#ccc; } <div id='magazine'> <div> Page 1 </div> <div> Page 2 </div> <div> Page 3 </div> </div> //Code Ends
Now use the following code.
//Code Starts ?$(document).ready(function(){ $('#magazine').turn(); });? //Code Ends
There are many options/events available with this plugin which you can use to customize it. Click here to find out all the available options with this plugin.
Credit : @blasten
Official website : turn.js
Feel free to contact me for any help related to jQuery, I will gladly help you.