Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.25 KB | None | 0 0
  1. <link media="all" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/smoothness/jquery-ui.css" rel="stylesheet"/>
  2. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
  3. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js"></script>
  4.  
  5. <script type="text/javascript">
  6. $(function() {
  7. $('#id').autocomplete({
  8. source: ["ActionScript",
  9. "AppleScript",
  10. "Asp",
  11. "BASIC",
  12. "C",
  13. "C++",
  14. "Clojure",
  15. "COBOL",
  16. "ColdFusion",
  17. "Erlang",
  18. "Fortran",
  19. "Groovy",
  20. "Haskell",
  21. "Java",
  22. "JavaScript",
  23. "Lisp",
  24. "Perl",
  25. "PHP",
  26. "Python",
  27. "Ruby",
  28. "Scala",
  29. "Scheme"
  30. ],
  31. minLength: 0
  32. });
  33.  
  34. $('#id').focus(function(){
  35. $(this).trigger('keydown.autocomplete');
  36. });
  37. });
  38. </script>
  39.  
  40.  
  41. <input type="text" id="id">
  42.  
  43. <input type="text1" id="id2">
  44.  
  45. <script type="text/javascript">
  46. $(function() {
  47. $('#id').autocomplete({
  48. source: ["ActionScript",
  49. "AppleScript",
  50. "Asp",
  51. "BASIC",
  52. "C",
  53. "C++",
  54. "Clojure",
  55. "COBOL",
  56. "ColdFusion",
  57. "Erlang",
  58. "Fortran",
  59. "Groovy",
  60. "Haskell",
  61. "Java",
  62. "JavaScript",
  63. "Lisp",
  64. "Perl",
  65. "PHP",
  66. "Python",
  67. "Ruby",
  68. "Scala",
  69. "Scheme"
  70. ],
  71. minLength: 0
  72. });
  73.  
  74. $('#id').focus(function(){
  75. $(this).trigger('keydown.autocomplete');
  76. });
  77. });
  78.  
  79. <script type="text/javascript">
  80. $(function() {
  81. $('#id').autocomplete({
  82. source: ["ActionScript",
  83. "AppleScript",
  84. "Asp",
  85. "BASIC",
  86. "C",
  87. "C++",
  88. "Clojure",
  89. "COBOL",
  90. "ColdFusion",
  91. "Erlang",
  92. "Fortran",
  93. "Groovy",
  94. "Haskell",
  95. "Java",
  96. "JavaScript",
  97. "Lisp",
  98. "Perl",
  99. "PHP",
  100. "Python",
  101. "Ruby",
  102. "Scala",
  103. "Scheme"
  104. ],
  105. minLength: 0
  106. }).on("focus", function () {
  107. $(this).autocomplete("search", '');
  108. });
  109.  
  110. });
  111. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement