Skip to content

A jQuery combobox based on the example in jQuery UI autocomplete demo

Notifications You must be signed in to change notification settings

jebus905/jquery.combobox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#jQuery Combobox Widget

A comobox widget based on the jQuery UI autocomplete demo Original code can be found here.

##Features

  • works with jQuery 1.8+
  • requires jQuery UI 1.9+

##Usage

Basic usage:

$('select').combobox( {options} );

##Parameters

###Options

####forceUcase

forceUcase will force any entered data to uppercase. Boolean value. Default = false

####invalidAction

invalidAction Dictates the action to perform if an item not already in the list of selectable items is entered. String value. Default = remove.
Available values:

invalidAction Action Description
add New value is added to the bottom of the list.
remove Value is removed (cleared out) and an error is displayed.

####classPrefix

classPrefix The prefix used to apply to the classes of all elements involved. String value. Default = ui

The classes involved include:

  • wrapper gets prefix-combobox
  • input box gets prefix-combobox-input
  • button gets prefix-combobox-toggle

###Methods

####enable

Will enable the combobox.

####disable

Will disable the combobox.

####destroy

Will destroy all combobox elements and restore the original select element.

####select

Will force the selection of given value

Code example:

$("select").combobox("select", "Option 2");

####option

Get or Set options on-the-fly.

Code example:

$("select").combobox("option", "forceUcase");			// getter
$("select").combobox("option", "forceUcase", true);		// setter

###Events

####itemRemoved

Fires when the user enters invalid data into the combobox.

####itemAdded

Fires when the user enters data into the combobox that wasn't already listed.

####open

Fires before displaying the list of options.

####focus

Fires when the input box gets focus.

About

A jQuery combobox based on the example in jQuery UI autocomplete demo

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published