This repository has been archived by the owner on Aug 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
/
example.html
91 lines (80 loc) · 2.71 KB
/
example.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
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script type="text/javascript" src="http://xoxco.com/projects/code/multipage/jquery.multipage.js"></script>
<link rel="stylesheet" href="http://xoxco.com/projects/code/multipage/jquery.multipage.css" />
<script type="text/javascript" src="http://xoxco.com/projects/code/tagsinput/jquery.tagsinput.js"></script>
<link rel="stylesheet" href="http://xoxco.com/projects/code/tagsinput/jquery.tagsinput.css" />
<script type="text/javascript">
$(window).ready(function() {
$('#multipage').multipage();
$('form').submit(function(){ alert("Submitted!"); return false;});
});
function generateTabs(tabs) {
html = '';
for (var i in tabs) {
tab = tabs[i];
html = html + '<li class="multipage_tab"><a href="#" onclick="return $(\'#multipage\').gotopage(' + tab.number + ');">' + tab.title + '</a></li>';
}
$('<ul class="multipage_tabs" id="multipage_tabs">'+html+'<div class="clearer"></div></ul>').insertBefore('#multipage');
}
function setActiveTab(selector,page) {
$('#multipage_tabs li').each(function(index){
if ((index+1)==page) {
$(this).addClass('active');
} else {
$(this).removeClass('active');
}
});
}
function transition(from,to) {
$(from).fadeOut('fast',function(){$(to).fadeIn('fast');});
}
function textpages(obj,page,pages) {
$(obj).html(page + ' of ' + pages);
}
</script>
<style type='text/css'>
p.input label { display:block; }
p.input input { width: 200px; }
.clearer { clear:both; width:100%; height:0px; }
</style>
<form id="multipage">
<fieldset id="page_one">
<legend>Basic Details</legend>
<p class="input">
<label for="email">Email</label>
<input name="email" id="email" value="" />
</p>
<p class="input">
<label for="pass">Pass</label>
<input name="pass" id="pass" value="" />
</p>
</fieldset>
<fieldset id="page_two">
<legend>About You</legend>
<p class="input">
<label for="name">Name</label>
<input name="name" id="name" value="" />
</p>
<p class="input">
<label for="loc">Location</label>
<input name="loc" id="loc" value="" />
</p>
<p class="input">
<label for="tags">
Tags</label>
<input name="tags" id="tags" value="foo,bar,baz,booda" />
</p>
</fieldset>
<fieldset id="page_three">
<legend>Stuff</legend>
<p class="input">
<label for="age">Age</label>
<input name="age" id="age" value="" />
</p>
<p class="input">
<label for="loc">Location</label>
<input name="loc" id="loc" value="" />
</p>
</fieldset>
<input type="submit" value="Create User" />
</form>