PHPackages                             gozoro/jquery-autocompleter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gozoro/jquery-autocompleter

ActivePlugin[Utility &amp; Helpers](/categories/utility)

gozoro/jquery-autocompleter
===========================

A jQuery plugin autocomplete.

v2.0.6(1y ago)0531MITJavaScript

Since Dec 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/gozoro/jquery-autocompleter)[ Packagist](https://packagist.org/packages/gozoro/jquery-autocompleter)[ Docs](https://github.com/gozoro/jquery-autocompleter)[ RSS](/packages/gozoro-jquery-autocompleter/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (6)Used By (1)

jquery-autocompleter
====================

[](#jquery-autocompleter)

A jQuery plugin autocomplete

Installation
------------

[](#installation)

```
	composer require gozoro/jquery-autocompleter

```

Usage
-----

[](#usage)

**Using an variant array**

```

	$(document).ready(function()
	{
		var items = [
			"Afghanistan",
			"Albania",
			"Algeria",
			"Andorra",
			"Angola",
			"Antigua and Barbuda",
			"Argentina",
			"Armenia",
			"Australia",
			"Austria",
			"Azerbaijan"
		];

		$("#autocompleter").autocompleter(items);
	});
';
```

[![Example](https://raw.githubusercontent.com/gozoro/jquery-autocompleter/main/images/autocompleter.gif)](https://raw.githubusercontent.com/gozoro/jquery-autocompleter/main/images/autocompleter.gif)**Using AJAX**

```

	$(document).ready(function()
	{
		var items = "script_get_items.php"; // script must be returns JSON with an variant array

		$("#autocompleter").autocompleter(items);
	});
';
```

Options
-------

[](#options)

#### maxResults

[](#maxresults)

Maximum number of suggestions (0 - no limits).

Default: 0.

#### minChars

[](#minchars)

Minimum number of characters for the suggestions.

Default: 1.

#### delay

[](#delay)

Keyboard input delay.

Default: 500 ms.

#### ajaxData

[](#ajaxdata)

The function must return ajax-request data. Here you can get additional parameters for the ajax-request.

Default:

```
function(value)
{
	return {value:value};
}
```

- `value` - input search value

#### template

[](#template)

The function must return the item value used to compare with the input value when filtering. The result of the function determines the match of the input string.

Default:

```
function(item, index)
{
	return item;
}
```

- `item` - item value of variant list.
- `index` - item key of variant list.

#### value

[](#value)

The function must return value for the request (when item is selected). This option enables the use of hidden input. You can use this option when you want to use an identifier instead of a text string from input.

Default: returned value of function from `template` option.

Example:

```
function(item, index)
{
	return index;
}
```

- `item` - item value of variant list.
- `index` - item key of variant list.

#### hiddenDefaultValue

[](#hiddendefaultvalue)

Default value for the hidden input.

Default: "".

#### row

[](#row)

The function must return a value used for display a suggestions. You can change the format of the output suggestion string.

Default:

```
function(item, index)
{
	return item;
}
```

- `item` - item value of variant list.
- `index` - item key of variant list.

Example:

```
function(item, index)
{
	return '' + item + '';
}
```

#### filter

[](#filter)

Function must return a boolean value. When a variant must be included in the list of suggestions this function must return `true` instead of `false`.

Default:

```
function(item, index, inputValue, template)
{
	return ~template.toLowerCase().indexOf(inputValue.toLowerCase());
}
```

- `item` - item value of variant list.
- `index` - item key of variant list.
- `inputValue` - current input value.
- `template` - value of option `template`.

Events
------

[](#events)

#### autocompleter:select

[](#autocompleterselect)

The event is triggered when an item from the list of items is selected.

#### autocompleter:unselect

[](#autocompleterunselect)

The event is triggered when an item from the list of items is unselected.

Example:

```

.form-control.success{
	border-color: #3c763d;
	background-color: #dff0d8;
}

$(document).ready(function()
{
	var items = [
		"Afghanistan",
		"Albania",
		"Algeria",
		"Andorra",
		"Angola",
		"Antigua and Barbuda",
		"Argentina",
		"Armenia",
		"Australia",
		"Austria",
		"Azerbaijan"
	];

	$("#autocompleter").autocompleter(items)
	.on('autocompleter:select', function(event, data)
	{
		$(this).addClass('success');
		console.log('selected:', data.value, data.template);

	})
	.on('autocompleter:unselect', function(event){
		$(this).removeClass('success');
	});
});
';
```

[![Example](https://raw.githubusercontent.com/gozoro/jquery-autocompleter/main/images/autocompleter.events.gif)](https://raw.githubusercontent.com/gozoro/jquery-autocompleter/main/images/autocompleter.events.gif)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~318 days

Total

5

Last Release

705d ago

Major Versions

v1.0.2 → v2.0.52024-06-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/a273abe77cdd4c74270a90320efbeb4d4dfb3ceac5b4d505ce2ccafddf1e06e0?d=identicon)[gozoro](/maintainers/gozoro)

---

Top Contributors

[![gozoro](https://avatars.githubusercontent.com/u/13768280?v=4)](https://github.com/gozoro "gozoro (45 commits)")

---

Tags

autocompletejqueryajaxsuggestionsautocompleter

### Embed Badge

![Health badge](/badges/gozoro-jquery-autocompleter/health.svg)

```
[![Health](https://phpackages.com/badges/gozoro-jquery-autocompleter/health.svg)](https://phpackages.com/packages/gozoro-jquery-autocompleter)
```

###  Alternatives

[kartik-v/yii2-tree-manager

An enhanced tree management module with tree node selection and manipulation using nested sets.

156529.0k15](/packages/kartik-v-yii2-tree-manager)[openskill/datatable

This is a Laravel 5 package for the server and client side of DataTables (http://datatables.net/)

5511.2k1](/packages/openskill-datatable)[sintret/yii2-chat-adminlte

Yii2 extension for Chat plugin with admin lte

2714.7k3](/packages/sintret-yii2-chat-adminlte)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
