-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.html
More file actions
129 lines (123 loc) · 4.37 KB
/
Copy pathexample.html
File metadata and controls
129 lines (123 loc) · 4.37 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>ExpanderPro.js 2.0</title>
<style>
h1 small { font-size: 16px; color: #c0c0c0; font-weight: normal; clear: both; display: block; }
.list { font-family: 'Helvetica',serif; width: 600px; margin: 50px auto 0 auto; border: 1px solid #ccc; padding: 20px; color: #333; }
.list .expandee { margin-bottom: 20px; }
.list .expandee .trigger { padding: 15px; background: #f0f0f0; cursor: pointer; }
.list .expandee .target { padding: 15px; background: #f0f0f0; border-top: 1px solid #ccc; }
pre {
background-color: #f8f8f8;
border: 1px solid #ddd;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px;
}
</style>
</head>
<body>
<!--
EXPLAINING MARKUP
-->
<section class="list">
<h1>ExpanderPro.js 2.0 <small>http://github.com/AlexanderBech/jquery-expanderpro</small></h1>
<div class="expandee">
<div class="trigger">Usage</div>
<div class="target">
<pre>$('.list').expanderPro();</pre>
<pre><section class="list">
<div class="expandee">
<div class="trigger">Trigger</div>
<div class="target">Target</div>
</div>
<div class="expandee">
<div class="trigger">Trigger</div>
<div class="target">Target</div>
</div>
<div class="expandee">
<div class="trigger">Trigger</div>
<div class="target">Target</div>
</div>
</section>
</pre>
</div>
</div>
<div class="expandee">
<div class="trigger">Options</div>
<div class="target">
<pre>$('.list').expanderPro({
expandItem: "expandee", // Item class
triggerClass: "trigger", // Trigger class
targetClass: "target", // Target class
expandedClass: "expanded", // Expanded class
hoverClass: "over", // If not null, will add class on hover
animSpeed: 500, // Animation speed in miliseconds
hideTrigger: false, // If true, will hide trigger on select
closeOthers: false, // If true, will close other elements than selected,
startExpanded: false, // If true, target will start expanded
preventClosing: false, // If true, expanded item will not close on trigger
openFirst: false, // If true, first item will open at init
callbackOpen: null, // Callback on open
callbackClose: null // Callback on close
});
</pre>
</div>
</div>
<div class="expandee">
<div class="trigger">Author</div>
<div class="target">
<p>Alexander Bech</p>
<p><a href="https://github.com/AlexanderBech/jquery-expanderpro" target="_blank">https://github.com/AlexanderBech/jquery-expanderpro</a></p>
<p><a href="http://www.alexanderbech.com/" target="_blank">http://alexanderbech.com</a></p>
<p><a href="http://twitter.com/AlexanderBech" target="_blank">twitter@AlexanderBech</a></p>
</div>
</div>
</section>
<!--
SIMPLE MARKUP
-->
<section class="list">
<div class="expandee">
<div class="trigger">Trigger</div>
<div class="target">Target</div>
</div>
<div class="expandee">
<div class="trigger">Trigger</div>
<div class="target">Target</div>
</div>
<div class="expandee">
<div class="trigger">Trigger</div>
<div class="target">Target</div>
</div>
</div>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="jquery.expanderpro.min.js"></script>
<script>
$(document).ready(function(){
$('.list').expanderPro({
expandItem: "expandee", // Item class
triggerClass: "trigger", // Trigger class
targetClass: "target", // Target class
expandedClass: "expanded", // Expanded class
hoverClass: "over", // If not null, will add class on hover
animSpeed: 500, // Animation speed in miliseconds
hideTrigger: false, // If true, will hide trigger on select
closeOthers: false, // If true, will close other elements than selected,
startExpanded: false, // If true, target will start expanded
preventClosing: false, // If true, expanded item will not close on trigger
openFirst: false, // If true, first item will open at init
callbackOpen: function(obj){ // Callback on open
// alert('opening...');
// Get access to the item, trigger and target with obj
// Ex. obj.trigger (jQuery object)
},
callbackClose: null // Callback on close
});
});
</script>
</body>
</html>