You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.js 448B

8 years ago
12345678910111213141516171819202122
  1. // Generated by CoffeeScript 1.9.2
  2. (function() {
  3. var handle;
  4. handle = function(serp, status, resp) {
  5. var rendered, template;
  6. template = $('#template').html();
  7. Mustache.parse(template);
  8. rendered = Mustache.render(template, serp);
  9. return $("#serp").html(rendered);
  10. };
  11. window.search = function() {
  12. var q;
  13. q = $('#q').val();
  14. $.getJSON('/api', {
  15. q: q
  16. }, handle);
  17. return true;
  18. };
  19. }).call(this);