This repository has been archived by the owner on May 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.php
189 lines (164 loc) · 6.12 KB
/
index.php
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JavaScript jQuery plugin Demos | Adhocore » Jitendra Adhikari</title>
<link rel="stylesheet" href="css/style.css" media="all" />
<link rel="stylesheet" href="css/jDatepicker.css" media="all" />
</head>
<body>
<div id="ground">
<h2>Click on the title to expand or collapse block</h2>
<div id="pagination">
<fieldset>
<legend class="slide">jPagination Demo</legend>
<div class="toggle">
<fieldset>
<legend class="slide">1. without ajax</legend>
<div id="pager" class="toggle">
<?php
for ($i = 1; $i < 106; $i++)
echo "<div class=\"item\">static item {$i}</div> \n";
?>
</div>
</fieldset>
<fieldset>
<legend class="slide">2. with ajax </legend>
<div id="pager-ajax" class="toggle">
</div>
</fieldset>
</div>
</fieldset>
</div>
<div id="datepicker">
<fieldset>
<legend class="slide">Nepali(BS) jDatepicker Demo</legend>
<div class="toggle">
<div class="input"><span class="label">Nepali Date: </span><input id="np-datepicker" type="text"/> </div>
<div class="input"><span class="label">English Date: </span><input id="dateAD" type="text" readonly="readonly" placeholder="filled by jDatepicker"/> </div>
</div>
</fieldset>
</div>
<div id="replenish">
<fieldset>
<legend class="slide">Replenish Demo</legend>
<div class="toggle">
<fieldset>
<legend class="slide">1. without HTML5</legend>
<form id="fill" class="toggle">
<div class="input"><span class="label"> Text </span> <input type="text" class="required" /> </div>
<div class="input"><span class="label">URL</span> <input type="text" class="url required"/> </div>
<div class="input"><span class="label">Date </span><input type="text" class="date required"/> </div>
<div style="clear:both"></div>
<div class="input"><span class="label">Email</span> <input type="text" class="email required"/> </div>
<div class="input"><span class="label">Number</span> <input type="text" class="number required" /> </div>
<div class="input"><span class="label">Combo</span> <select class="required">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option></select>
</div>
<div style="clear:both"></div>
<span class="label"> Textarea </span><textarea class="required" rows="4" style="width:99%"></textarea>
<br/>
<input type="submit" value="Submit" />
</form>
</fieldset>
<fieldset>
<legend class="slide">2. with HTML5</legend>
<form id="fill1" class="toggle">
<div class="input"><span class="label"> Text </span> <input type="text" required="required" /> </div>
<div class="input"><span class="label">URL </span><input type="url" required="required"/> </div>
<div class="input"><span class="label">Date </span><input type="date" required="required"/> </div>
<div style="clear:both"></div>
<div class="input"><span class="label">Email </span><input type="email" required="required"/> </div>
<div class="input"><span class="label">Number</span> <input type="number" required="required" /> </div>
<div class="input"><span class="label">Combo </span><select required="required">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option></select>
</div>
<div style="clear:both"></div>
<span class="label">Textarea </span><textarea required="required" rows="4" style="width:99%"></textarea>
<br/>
<input type="submit" value="Submit"/>
</form>
</fieldset>
</div>
</fieldset>
</div>
<div id="float-top">
<fieldset>
<legend class="slide">FloatTop Demo</legend>
<div class="toggle">
<h4>The boxes for this demo are dynamically generated (by PHP script) and have varying heights</h4>
<div class="boxwrap">
<?php
$pool = 'abcdefghijklmnopqrstuvwxyz';
for ($i = 1; $i < 15; $i++): ?>
<div class="box">
<?php
$str = '';
$len = mt_rand(80, 360);
while ( $len > strlen($str) )
$str .= substr($pool, mt_rand(0, 25), 1) . " ";
echo "<span> {$str} </span>";
?>
</div>
<?php endfor;?>
</div>
<br/>
<div style="clear: both;"></div>
<input type="button" id="toggle-float" value="Remove floatTop" />
</div>
</fieldset>
</div>
<h3>© 2012 - 2013 — adhocore | Jitendra Adhikari</h3>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="js/jReplenish.js" type="text/javascript"></script>
<script src="js/jFloatTop.js" type="text/javascript"></script>
<script src="js/jPaginate.js" type="text/javascript"></script>
<script src="js/jDatepicker.js" type="text/javascript"></script>
<script>
$(function(){
$('.slide').click(function(){
$(this).parent().children('.toggle').slideToggle('slow');
});
$('#np-datepicker').jDatepicker({separator: '-', ADelm: 'dateAD'});
$('#fill').jReplenish();
$('#fill1').jReplenish();
$('#pager').jPaginate({startPage: 3, perPage: 12});
$('#pager-ajax').jPaginate({
perPage: 12,
maxPageLinks: 15,
ajax: {
baseurl: 'paging-ajax-demo.php',
format: 'offset&perpage',
total: 105,
offset: 'start',
perpage: 'limit',
currpage: 'page'
}
});
$('.boxwrap').jFloatTop({
itemClass:'box',
col: 4, gap: 10
});
$('#toggle-float').click(function(){
$(this).toggleClass('added');
if ($(this).hasClass('added')){
$('.boxwrap .box').each(function(j, a){
$(this).attr('style', 'float: left; width: 20%;');
});
$(this).val('Add floatTop');
} else {
$('.boxwrap').jFloatTop({
itemClass:'box',
col: 4, gap: 10
});
$(this).val('Remove floatTop');
}
});
});
</script>
</body>
</html>