Home > DeveloperSection > Forums > How to Make Autocomplete textbox using jquery ?
Ankita Pandey
Ankita Pandey

Total Post:183

Points:1285
Posted on    September-22-2014 7:18 AM

 JQuery JavaScript  JQuery 
Ratings:


 1 Reply(s)
 2265  View(s)
Rate this:
i'm just make auto complete textbox but not work properly can you solve my problem
here is my jquery library

<link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
 
 <script src="//code.jquery.com/jquery-1.10.2.js"></script>

  <script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>

Here is my JQuery Code

<script>
  $(function() {
    $("#autocomplete").autocomplete();
  });
  </script>

And here is my Html Code

<div class="ui-widget">
  <label>Tags: </label>
  <input id="autocomplete">
</div>


Kamlakar Singh
Kamlakar Singh

Total Post:194

Points:1396
Posted on    September-22-2014 7:24 AM

Hi Ankita,

try this code:
<script>
  $(function() {
    var availableTags = ["Java","C#","JQuery","VB","C","C++","JavaScript","Html","SQL","DS","CSS"];
    $("#autocomplete").autocomplete({
      source: availableTags
    });
  });
  </script>

Hope the above code will solve your problem.

Modified On Sep-25-2014 01:35:21 AM

Don't want to miss updates? Please click the below button!

Follow MindStick