This repository has been archived by the owner on May 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 98
/
demoNoRemove.js
66 lines (58 loc) · 1.95 KB
/
demoNoRemove.js
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
$(function(){
var findVisibleID = function(){
return "#" + $(".flipbox").children().filter(function() { return $(this).css("display") == "block"; }).attr("id");
}
$("#btn-reverse").on("click",function(e){
$(".flipbox").flippyReverse();
e.preventDefault();
});
$("#btn-left").on("click",function(e){
$(".flipbox").flippy({
color_target: "red",
direction: "left",
duration: "750",
verso: "#left-content",
recto: findVisibleID(),
backhtml: "<span id=\"left-content\">Woohoo ! \\o/</span>",
noRemove: true
});
e.preventDefault();
});
$("#btn-right").on("click",function(e){
$(".flipbox").flippy({
color_target: "red",
direction: "right",
duration: "750",
verso: "#right-content",
recto: findVisibleID(),
backhtml: "<div id=\"right-content\"><img src=\"http://placekitten.com/610/300\" alt=\"placeholder\"/></div>",
noRemove: true
});
e.preventDefault();
});
$("#btn-top").on("click",function(e){
$(".flipbox").flippy({
color_target: "#b6d635",
direction: "top",
duration: "750",
verso: "#top-content",
recto: findVisibleID(),
backhtml: "<span id=\"top-content\" class=\"big\">Great !</span>",
noRemove: true
});
e.preventDefault();
});
$("#btn-bottom").on("click",function(e){
$(".flipbox").flippy({
color_target: "#03588C",
direction: "bottom",
duration: "750",
verso: "#bottom-content",
recto: findVisibleID(),
backhtml: "<span id=\"bottom-content\" class=\"big\">Flip !</span>",
noRemove: true
});
e.preventDefault();
});
SyntaxHighlighter.all();
});