Skip to content

kinguru/bootcomplete.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

bootcomplete.js

Lightweight AJAX autocomplete for Bootstrap

Requires

Basic Usage

$('#input').bootcomplete({url:'/search.php'});

JSON Response Object

[ { id : someId, label : "some label name" } ]

Options

url:
The url to submit query

method:
Request method (get, post)

wrapperClass:
CSS Class used for the element wrapper

menuClass:
CSS Class used for the suggestions menu

idField:
Include hidden input field for selected option id (true,false) Default: true

idFieldName:
Hidden input field name. Default: elementName_id

minLength:
Minimum string length before sending query request

dataParams:
Send additional data parameters with request. Usage: dataParams: {keyName : value}

formParams:
Send chained form parameters with request. Usage: formParams: {keyName : $('#formElement')}

Demo

Click here to see the examples in action.

About

bootcomplete.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 95.5%
  • CSS 4.5%