Jquery ui autocomplete demo

Jquery ui autocomplete demo : It provides the suggestions when you type in the text field.
First Include the jquery and ui autocomplte jquery and jQuery-ui.css. We are going to explain the jquery ui autocomplete with example and demo.

Jquery ui autocomplete demo

Here is an example of jQuery ui autocomplete using jQuery ui library –

Example

<link rel=”stylesheet” href=”//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css”>
<script src=”//code.jquery.com/jquery-1.10.2.js”></script>
<script src=”//code.jquery.com/ui/1.11.4/jquery-ui.js”></script>
<script>
$(function() {
var availableTags = [
“United States”,
“France”,
“Germany”,
“China”,
“Australia”,
“England”,
“Saouth Korea”,
“India”
];
$( “#tags” ).autocomplete({
source: availableTags
});
});
</script><label for=”tags”>Tags: </label>
<input id=”tags” placeholder=”Enter Some Text…”>

Demo »download-icon for Jquery ui autocomplete Download

The above code will produce following result-

Note : This is image of the output. To run this demo click on the above “Try it” button.

Jquery ui autocomplete demo


User Ans/Comments

📖 Read More


Advertisements