Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(document).ready(function () {
- $('.search_box').typeahead({
- source: function (query, result) {
- $.ajax({
- url: "/p/autosearch",
- data: 'q=' + query,
- dataType: "json",
- type: "post",
- success: function (data) {
- result($.map(data, function (item) {
- return item;
- }));
- }
- });
- }
- });
- });
Add Comment
Please, Sign In to add comment