成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

分享生成翻頁效果的jQuery插件-bookblock

2024-04-30    分類: 網(wǎng)站建設(shè)

今天我們介紹一個漂亮的jQuery翻頁效果插件 - bookblock,使用它可以創(chuàng)建動態(tài)的類似書本翻頁效果的幻燈。希望大家喜歡!

這個插件依賴于jQuery++,這個類庫是一個jQuery的擴展類庫,這里使用了它的swipe事件。

HTML代碼

主要html代碼如下,生成需要展示的圖片內(nèi)容: <div id="bb-bookblock"> <div> <a ><img src="images/animals/a.jpg" alt="image01"/></a> </div> <div> <a ><img src="images/animals/b.jpg" alt="image02"/></a> </div> <div> <a ><img src="images/animals/c.jpg" alt="image03"/></a> </div> <div> <a ><img src="images/animals/d.jpg" alt="image04"/></a> </div> <div> <a ><img src="images/animals/e.jpg" alt="image05"/></a> </div> <div> <a ><img src="images/animals/f.jpg" alt="image05"/></a> </div> </div>

Javacript代碼

$(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, shadowSides : 0.8, shadowFlip : 0.7 } ) }, init = function() { initEvents(); }, initEvents = function() { var $slides = config.$bookBlock.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(); return false; } ); config.$navJump.on( 'click', function() { config.bb.jump( totalSlides ); return false; } ); // add swipe events $slides.on( { 'swipeleft' : function( event ) { config.bb.next(); return false; }, 'swiperight' : function( event ) { config.bb.prev(); return false; } } ); }; return { init : init }; })(); Page.init(); });

主要參數(shù)

主要參數(shù)如下:

// speed for the flip transition in ms.

speed : 1000,

// easing for the flip transition.

easing : 'ease-in-out',

// if set to true, both the flipping page and the sides will have an overlay to simulate shadows

shadows : true,

// opacity value for the "shadow" on both sides (when the flipping page is over it).

// value : 0.1 - 1

shadowSides : 0.2,

// opacity value for the "shadow" on the flipping page (while it is flipping).

// value : 0.1 - 1

shadowFlip : 0.1,

// perspective value

perspective : 1300,

// if we should show the first item after reaching the 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 transition.

// page is the current item's index.

// isLimit is true if the current page is the last one (or the first one).

onEndFlip : function( page, isLimit ) { return false; },

// callback before the flip transition.

// page is the current item's index.

onBeforeFlip: function( page ) { return false; }

希望大家喜歡這個插件。

本文來自成都品牌網(wǎng)站建設(shè)網(wǎng)站設(shè)計公司-創(chuàng)新互聯(lián)

本文名稱:分享生成翻頁效果的jQuery插件-bookblock
地址分享:http://jinyejixie.com/news16/326866.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制網(wǎng)站、云服務器、關(guān)鍵詞優(yōu)化虛擬主機、搜索引擎優(yōu)化動態(tài)網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都定制網(wǎng)站網(wǎng)頁設(shè)計
襄城县| 斗六市| 清流县| 杂多县| 绥芬河市| 巧家县| 焉耆| 山东| 承德县| 太原市| 宣武区| 松溪县| 阿瓦提县| 阿瓦提县| 江门市| 枣庄市| 青河县| 库尔勒市| 定南县| 收藏| 卫辉市| 西青区| 黄梅县| 荥经县| 临西县| 洪江市| 西乌珠穆沁旗| 清原| 河北区| 玛纳斯县| 伊金霍洛旗| 双流县| 舞钢市| 林芝县| 会宁县| 芮城县| 清水河县| 乌拉特后旗| 新沂市| 历史| 喀喇|