Intermediary transaction SEO diagnosis Taobao guest Cloud host technology Hall
Today we're going to introduce a nice jquery page-Flip effect plugin-Bookblock, which allows you to create dynamic slides that resemble book-flipping effects. I hope you like it!
This plugin relies on jquery++, which is an extended class library of jquery, where its swipe events are used.
HTML code
The main HTML code is as follows, generating the picture content that needs to be displayed:
<div id= "Bb-bookblock" class= "Bb-bookblock" > <div class= "Bb-item" > <a href= "http://www.gbin1.com" > <img src= "images/animals/a.jpg" alt= "image01"/></a> </div> <div class= "Bb-item" > <a href= " Http://www.gbin1.com "><img src=" images/animals/b.jpg alt= "Image02"/></a> </div> <div class = "Bb-item" > <a href= "http://www.gbin1.com" ><img src= "images/animals/c.jpg" alt= "image03"/></a > </div> <div class= "Bb-item" > <a href= "http://www.gbin1.com" ><img src= "Images/animals/d.jpg" "alt=" image04 "/></a> </div> <div class=" Bb-item "> <a href=" http://www.gbin1.com "><img Src= "Images/animals/e.jpg" alt= "image05"/></a> </div> <div class= "Bb-item" > <a href= "http://" Www.gbin1.com "><img src=" images/animals/f.jpg "alt=" image05 "/></a> </div> </div>
Javacript Code
$ (function () {var Page = (function () {var config = {$bookBlock: $ (' #bb-bookblock '), $navNext: $ (' #bb-nav-next '), $ Navprev: $ (' #bb-nav-prev '), $navJump: $ (' #bb-nav-jump '), BB: $ (' #bb-bookblock '). Bookblock ({speed:800, ShadowS ides:0.8, shadowflip:0.7})}, init = function () {initevents ();}, initevents = function () {var $slides = config. $b Ookblock.children (), totalslides = $slides. length; Add Navigation Events Config. $navNext. On (' click ', Function () {config.bb.next (); return false;}); Config. $navPrev. On (' click ', Function () {Config.bb.prev (); Config. $navJump. On (' click ', Function () {config.bb.jump (totalslides); Add swipe Events $slides. On ({' Swipeleft ': function (event) {Config.bb.next (); return false;}, ' Swiperight ': func tion (event) {Config.bb.prev (); return false;}} ); }; return {init:init}; })(); Page.Init (); });
Main parameters
The main parameters are as follows:
Speed for the flip transitions in Ms.
speed:1000,
Easing for the flip transitions.
Easing: ' Ease-in-out ',
If set to true, both the flipping page and the sides would have a overlay to simulate shadows
Shadows:true,
Opacity value for the "shadow" in both sides (when the flipping page was over it).
Value:0.1-1
shadowsides:0.2,
Opacity value for the "shadow" in the flipping page (while it is flipping).
Value:0.1-1
shadowflip:0.1,
Perspective value
PERSPECTIVE:1300,
If we should show the the ' the ' the ' reaching ' end.
Circular:false,
If we want to specify a selector that triggers the next () function. Example: ' #bb-nav-next '.
NextEl: ',
If we want to specify a selector that triggers the prev () function.
Prevel: ',
Callback after the flip transitions.
Page is the current item ' s index.
Islimit is true if the current page is the one (or the one).
Onendflip:function (page, Islimit) {return false;},
Callback unreported the flip transitions.
Page is the current item ' s index.
Onbeforeflip:function (page) {return false;}
Hope you like this plugin, if you have any questions, please give us a message, thank you!
Source: jquery plugin to help you generate page effects-Bookblock