This repository has been archived by the owner on Nov 10, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
187 lines (159 loc) · 5.73 KB
/
index.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
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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>jtyost2/Ajax-Utils @ GitHub</title>
<style type="text/css">
body {
margin-top: 1.0em;
background-color: #332822;
font-family: Helvetica, Arial, FreeSans, san-serif;
color: #ffffff;
}
#container {
margin: 0 auto;
width: 700px;
}
h1 { font-size: 3.8em; color: #F2DFBC; margin-bottom: 3px; }
h1 .small { font-size: 0.4em; }
h1 a { text-decoration: none }
h2 { font-size: 1.5em; color: #F2DFBC; }
h3 { text-align: center; color: #F2DFBC; }
a { color: #7F7E60; }
.description { font-size: 1.2em; margin-bottom: 30px; margin-top: 30px; font-style: italic;}
.download { float: right; }
pre { background: #000; color: #fff; padding: 15px;}
hr { border: 0; width: 80%; border-bottom: 1px solid #aaa}
.footer { text-align:center; padding-top:30px; font-style: italic; }
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript" src="./jquery.replace_location.js"></script>
<script type="text/javascript">
$(document).ready(function (){
$('.replace_location').replace_location({ajaxType: 'GET'});
});
</script>
</head>
<body>
<a href="http://github.com/jtyost2/Ajax-Utils">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" />
</a>
<div id="container">
<h1>
<a href="http://github.com/jtyost2/Ajax-Utils">Ajax-Utils</a>
<span class="small">by <a href="http://github.com/jtyost2">jtyost2</a></span>
</h1>
<div class="description">
</div>
<h2>Dependencies</h2>
<p>jQuery 1.7 – Tested jQuery 1.7+</p>
<h2>Authors</h2>
<p>Justin Yost ([email protected])</p>
<h2>Download</h2>
<p>
You can download this project in either
<a href="http://github.com/jtyost2/Ajax-Utils/zipball/master">zip</a> or
<a href="http://github.com/jtyost2/Ajax-Utils/tarball/master">tar</a> formats.
</p>
<p>You can also clone the project with <a href="http://git-scm.com">Git</a>
by running:
<pre>$ git clone git://github.com/jtyost2/Ajax-Utils</pre>
</p>
<h2>Demo of Replace Location jQuery Plugin</h2>
<h3>Replace Location with a Link</h3>
<p id="replaceThisParagraphButton">
This paragraph will go away when you click the link.
</p>
<a href="./sample_ajax.html" class="replace_location" data-replace-location="#replaceThisParagraphButton">Replace the above paragraph with data.</a>
<h4>Code</h4>
<pre>
<script type="text/javascript">
$(document).ready(function (){
$('.replace_location').replace_location({ajaxType: 'GET'});
});
</script>
<p id="replaceThisParagraphButton">
This pagraph will go away when you click the link.
</p>
<a
href="./sample_ajax.php"
class="replace_location middle"
data-replace-location="#replaceThisParagraphButton">
Replace the above paragraph with data.
</a>
</pre>
<h3>Replace Location with a Select Element</h3>
<p id="replaceThisParagraphSelect">
This paragraph will go away when you change the select.
</p>
<form>
<select name="select" class="replace_location" href="./sample_ajax.html" data-replace-location="#replaceThisParagraphSelect">
<option value="first">First</option>
<option value="second">Second</option>
<option value="third">Third</option>
<option value="fourth">Fourth</option>
</select>
</form>
<h4>Code</h4>
<pre>
<script type="text/javascript">
$(document).ready(function (){
$('.replace_location').replace_location({ajaxType: 'GET'});
});
</script>
<p id="replaceThisParagraphSelect">
This paragraph will go away when you change the select.
</p>
<form>
<select
name="select"
class="replace_location"
href="./sample_ajax.php"
data-replace-location="#replaceThisPargraphSelect">
<option value="first">First</option>
<option value="second">Second</option>
<option value="third">Third</option>
<option value="fourth">Fourth</option>
</select>
</form>
</pre>
<h3>Replace Location with a Submit Event</h3>
<p id="replaceThisParagraphSubmit">
This paragraph will go away when you submit the form.
</p>
<form method="get" action="./sample_ajax.html" data-replace-location="#replaceThisParagraphSubmit" class="replace_location">
<input type="text"></input>
<select name="select">
<option value="first">First</option>
<option value="second">Second</option>
<option value="third">Third</option>
<option value="fourth">Fourth</option>
</select>
<input type="submit"/>
</form>
<h4>Code</h4>
<pre>
<script type="text/javascript">
$(document).ready(function (){
$('.replace_location').replace_location({ajaxType: 'GET'});
});
</script>
<p id="replaceThisParagraphSubmit">
This paragraph will go away when you submit the form.
</p>
<form method="get" action="./sample_ajax.html" data-replace-location="#replaceThisParagraphSubmit" class="replace_location>
<input type="text"></input>
<select>
<option value="first">First</option>
<option value="second">Second</option>
<option value="third">Third</option>
<option value="fourth">Fourth</option>
</select>
</form>
</pre>
<div class="footer">
get the source code on GitHub : <a href="http://github.com/jtyost2/Ajax-Utils">jtyost2/Ajax-Utils</a>
</div>
</div>
</body>
</html>