PageRenderTime 60ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/plugins/EasyAutocomplete-master/demo/example_duckduckgo.html

https://bitbucket.org/quickfinder/quickfinder-old
HTML | 37 lines | 26 code | 11 blank | 0 comment | 0 complexity | c1c830283b2eba58e836c05510f6129b MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, MPL-2.0-no-copyleft-exception, MIT
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>EasyAutocomplete duckduckgo example</title>
  5. <link href="../dist/easy-autocomplete.min.css" rel="stylesheet" type="text/css">
  6. <script src="../lib/jquery-1.11.2.min.js"></script>
  7. <script src="../dist/jquery.easy-autocomplete.min.js" type="text/javascript" ></script>
  8. </head>
  9. <body>
  10. <h1>EasyAutocomplete - duckduckgo example</h1>
  11. <input id="ddg" />
  12. <script>
  13. var options = {
  14. url: function(phrase) {
  15. return phrase !== "" ? "http://api.duckduckgo.com/?q=" + phrase + "&format=json" : "http://api.duckduckgo.com/?q=empty&format=json";
  16. },
  17. getValue: "Text",
  18. ajaxSettings: {
  19. dataType: "jsonp"
  20. },
  21. listLocation: "RelatedTopics",
  22. };
  23. $("#ddg").easyAutocomplete(options);
  24. </script>
  25. </body>
  26. </html>