Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (28 sloc) 831 Bytes
<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>