I hereby claim:
- I am BforBen on github.
- I am bforben (https://keybase.io/bforben) on keybase.
- I have a public key whose fingerprint is 7BE1 CF7A FA4A 9027 D196 FAF0 6013 D29C AF23 67DB
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
$(function () { | |
$('#search_text').typeahead({ source: GoogleCseAutoComplete }); | |
}); |
var GoogleCseAutoComplete = function (query, process) { | |
$.ajax({ | |
url: 'https://clients1.google.com/complete/search?q=' + query + '&hl=en&client=partner&source=gcsc&partnerid={YOUR_GOOGLE_CSE_CODE}=cse&nocache=' + Math.random().toString(), | |
dataType: 'jsonp', | |
success: function (data) { | |
process($.map(data[1], function (item) { return item[0]; })); | |
} | |
}); | |
}; |
<form action="search" method="get" class="form-inline"> | |
<input type="search" name="search" placeholder="Enter keyword or phrase" autocomplete="off" id="search_text"> | |
<button type="submit" class="btn" value="Search">Search</button> | |
</form> |