HOW TO MAKE AUTOCOMPLETE TEXTBOX USING JQUERY ?

Ankita Pandey

Total Post:183

Points:1285
Posted by  Ankita Pandey
 2749  View(s)
Ratings:
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>
  1. Kamlakar Singh

    Post:194

    Points:1396
    Re: How to Make Autocomplete textbox using jquery ?

    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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!