jQuery UI Autocomplete Widget - jQuery UI Tutorial 12

preview_player
Показать описание
Notes for You:: jQuery UI Autocomplete Widget - jQuery UI Tutorial 12
- indicates UI control with pre populated list of values.
- It just filters out the list of values step by step based on the given search string from the pre populated list of values.

Creating Auto complete widget:
1. Create a new HTML document with basic HTML document structure code
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title> Auto complete Demo</title>
</head>
<body>
</body>
</html>

2. Link the necessary jQueryUI libray files to the HTML document

3. Code the structure of the widget (i.e. HTML or markup):
To create an auto complete widget; we need to create a text input field
<input type="text" id="autocomplete"/>

4. Select the element using jQuery and call the respective jQuery UI function on it
Select the element using jQuery selector, call autocomplete jQuery UI function on it and pass an object with its source value set to an array of values.

<script type="text/javascript">
$("#autocomplete").autocomplete( { source: ["AI","CG","DS","OS","C","C#","Java"] } );
</script>

Complete Code:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title> Auto complete Demo</title>

</head>
<body>
<input type="text" id="autocomplete"/>

<script type="text/javascript">
$("#autocomplete").autocomplete({source:["AI","CG","DS","OS","C","C#","Java"]});
</script>
</body>
</html>

Note:
- replace < with less-than symbol.
- replace > with greater-than symbol.

=========================================

Follow the link for next video:
jQuery UI Tutorial 13 - jQuery UI Selectmenu Tutorial

Follow the link for previous video:
jQuery UI Tutorial 11 - jQuery UI Spinner Tutorial

=========================================

jQuery UI Tutorials Playlist:-

=========================================
Watch My Other Useful Tutorials:-

Bootstrap Tutorials Playlist:-

Dreamweaver Tutorials Playlist:-

PHP Tutorials Playlist:-

=========================================

► Subscribe to our YouTube channel:

► Visit our Website:

=========================================
Hash Tags:-
#ChidresTechTutorials #jQueryUI #jQueryUITutorial
Рекомендации по теме
Комментарии
Автор

SUBSCRIBE, SHARE & SUPPORT:
VISIT & LEARN AT FREE OF COST:

ChidresTechTutorials
Автор

Hi, great video, very helpful, is it possible to use jquery autocomplete in adobe acrobat DC, any help would be greatly appreciated.

andrewfleet
Автор

nice tutorial, does the job.
Anyway, how can i use dictionary to fill the autocomplete.
If user types United in one form, then it should show UNITED STATES in that form and if selected for autofill, 2nd form field is also automatically filled with USA.

example:
dataset is === [United States, USA], [INDIA, IN], [Nepal, NP]
when user tries to fill first form, autocomplete it to full country name and also autofill secondform with abbrevation

Any idea how can i approach this problem??

amitsangwan
Автор

It has an error:
Uncaught SyntaxError: Unexpected string functions.js:32

bubbayugga