forked from codrops/BookBlock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index3.html
executable file
·153 lines (142 loc) · 5.08 KB
/
index3.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html lang="en" class="no-js demo-3">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BookBlock: A Content Flip Plugin - Demo 3</title>
<meta name="description" content="Bookblock: A Content Flip Plugin - Demo 3" />
<meta name="keywords" content="javascript, jquery, plugin, css3, flip, page, 3d, booklet, book, perspective" />
<meta name="author" content="Codrops" />
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" type="text/css" href="css/default.css" />
<link rel="stylesheet" type="text/css" href="css/bookblock.css" />
<!-- custom demo style -->
<link rel="stylesheet" type="text/css" href="css/demo3.css" />
<script src="js/modernizr.custom.js"></script>
</head>
<body>
<div class="container">
<!-- Top Navigation -->
<div class="codrops-top clearfix">
<a class="codrops-icon codrops-icon-prev" href="http://tympanus.net/codrops/2012/08/29/multiple-area-charts-with-d3-js/"><span>Previous Demo</span></a>
<span class="right"><a class="codrops-icon codrops-icon-drop" href="http://tympanus.net/codrops/2012/09/03/bookblock-a-content-flip-plugin/"><span>Back to the Codrops Article</span></a></span>
</div>
<header>
<h1>BookBlock <span>A Content Flip Plugin</span></h1>
<nav class="codrops-demos">
<a href="index.html">Demo 1</a>
<a href="index2.html">Demo 2</a>
<a class="current-demo" href="index3.html">Demo 3</a>
<a href="index4.html">Demo 4</a>
<a href="index5.html">Demo 5</a>
</nav>
</header>
<div class="main clearfix">
<div class="bb-custom-wrapper">
<h3>RTL Support</h3>
<div id="bb-bookblock" class="bb-bookblock">
<div class="bb-item">
<a href="http://drbl.in/bKVq"><img src="images/demo1/1.jpg" alt="image01"/></a>
</div>
<div class="bb-item">
<a href="http://drbl.in/ciTX"><img src="images/demo1/2.jpg" alt="image02"/></a>
</div>
<div class="bb-item">
<a href="http://drbl.in/cLHx"><img src="images/demo1/3.jpg" alt="image03"/></a>
</div>
<div class="bb-item">
<a href="http://drbl.in/bAfn"><img src="images/demo1/4.jpg" alt="image04"/></a>
</div>
<div class="bb-item">
<a href="http://drbl.in/dcbE"><img src="images/demo1/5.jpg" alt="image05"/></a>
</div>
</div>
<p>Illustrations by <a href="http://dribbble.com/kevinhowdeshell">Kevin Howdeshell</a></p>
<nav>
<a id="bb-nav-last" href="#" class="bb-custom-icon bb-custom-icon-first">First page</a>
<a id="bb-nav-next" href="#" class="bb-custom-icon bb-custom-icon-arrow-left">Next</a>
<a id="bb-nav-prev" href="#" class="bb-custom-icon bb-custom-icon-arrow-right">Previous</a>
<a id="bb-nav-first" href="#" class="bb-custom-icon bb-custom-icon-last">Last page</a>
</nav>
</div>
</div>
</div><!-- /container -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="js/jquerypp.custom.js"></script>
<script src="js/jquery.bookblock.js"></script>
<script>
var Page = (function() {
var config = {
$bookBlock : $( '#bb-bookblock' ),
$navNext : $( '#bb-nav-next' ),
$navPrev : $( '#bb-nav-prev' ),
$navFirst : $( '#bb-nav-first' ),
$navLast : $( '#bb-nav-last' )
},
init = function() {
config.$bookBlock.bookblock( {
speed : 800,
direction: 'rtl',
shadowSides : 0.8,
shadowFlip : 0.7
} );
initEvents();
},
initEvents = function() {
var $slides = config.$bookBlock.children();
// add navigation events
config.$navNext.on( 'click touchstart', function() {
config.$bookBlock.bookblock( 'next' );
return false;
} );
config.$navPrev.on( 'click touchstart', function() {
config.$bookBlock.bookblock( 'prev' );
return false;
} );
config.$navFirst.on( 'click touchstart', function() {
config.$bookBlock.bookblock( 'first' );
return false;
} );
config.$navLast.on( 'click touchstart', function() {
config.$bookBlock.bookblock( 'last' );
return false;
} );
// add swipe events
$slides.on( {
'swipeleft' : function( event ) {
config.$bookBlock.bookblock( 'prev' );
return false;
},
'swiperight' : function( event ) {
config.$bookBlock.bookblock( 'next' );
return false;
}
} );
// add keyboard events
$( document ).keydown( function(e) {
var keyCode = e.keyCode || e.which,
arrow = {
left : 37,
up : 38,
right : 39,
down : 40
};
switch (keyCode) {
case arrow.left:
config.$bookBlock.bookblock( 'next' );
break;
case arrow.right:
config.$bookBlock.bookblock( 'prev' );
break;
}
} );
};
return { init : init };
})();
</script>
<script>
Page.init();
</script>
</body>
</html>