forked from TapirGo/jquery-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.html
More file actions
40 lines (33 loc) · 1.17 KB
/
example.html
File metadata and controls
40 lines (33 loc) · 1.17 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Tapir jQuery plugin example</title>
<script src="jquery-1.6.1.min.js"></script>
<script src="jquery-tapir.min.js"></script>
<script>
// example 1 code
$('#search_results').tapir({token: '4dce6da43f61b05bff000052'});
// example 2 code
$('input[name="search"]').click(function(e) {
$('#search_results').tapir({
token: '4dce6da43f61b05bff000052',
query: $('input[name="query"]').val()
});
})
$('#search_results').tapir({'token': '4dce6da43f61b05bff000052'});
</script>
</head>
<body>
<h1>Tapir jQuery plugin examples</h1>
<h2>With ?query=example in the URL</h2>
<p>Call this page with the following params: ?query=example or <a href="?query=example">click this link</a>.</p>
<p>Results will be placed in the "search_results" div.</p>
<h2>With full javascript form</h2>
<input type="text" name="query"/>
<input type="button" name="search"/>
<p>Results will be placed in the "search_results" div.</p>
<h2>Search results:</h2>
<div id="search_results"></div>
</body>
</html>