html - Show dropdownlist with JQuery Autocomplete suggestions -


my jquery autocomplete working fine. after inserting "af", if press keydown, correctly "afghanistan". however, can never see dropdownlist countries. missing autocomplete option?

my code:

@html.textbox("countries", "", new { @class = "countries", @placeholder = "insert country..."})   <script src="https://code.jquery.com/jquery-1.9.1.js"></script>  <script>     $(function () {         var countrieslist = ["afghanistan", "albania", "algeria"]         $(".countries").autocomplete({ source: countrieslist });     }); </script> 

this example jquery site

<html lang="en"> <head>   <meta charset="utf-8">   <title>jquery ui autocomplete - default functionality</title>   <link rel="stylesheet" href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css">   <script src="//code.jquery.com/jquery-1.10.2.js"></script>   <script src="//code.jquery.com/ui/1.11.0/jquery-ui.js"></script>   <link rel="stylesheet" href="/resources/demos/style.css">   <script>   $(function() {     var availabletags = [       "actionscript",       "applescript",       "asp",       "basic",       "c",       "c++",       "clojure",       "cobol",       "coldfusion",       "erlang",       "fortran",       "groovy",       "haskell",       "java",       "javascript",       "lisp",       "perl",       "php",       "python",       "ruby",       "scala",       "scheme"     ];     $( "#tags" ).autocomplete({       source: availabletags     });   });   </script> </head> <body>  <div class="ui-widget">   <label for="tags">tags: </label>   <input id="tags"> </div>   </body> </html> 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -