-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
37 lines (28 loc) · 831 Bytes
/
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
<html>
<head>
<script src='http://code.jquery.com/jquery-1.7.2.min.js'></script>
<script>
(function($){
$(function(){
//this executes on dom ready
var callback = function(){ //this in this context is the form selected previously, ie. search-form
url = "https://api.badger.com/domains/search?callback=?query="
url += $('#q').val();
$.getJSON(url, function(data) {
console.dir(data);
});
return false;
}
$('form').submit(callback);
});
})(jQuery);
</script>
</head>
<body>
<h1>Hello World Badger Mobile</h1>
<form id='search-form' action='' method='post'>
<input type='text' id='q' value="">
<input type='submit'>
</form>
</body>
</html>