Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fatalxiao/jq-select
A simple dropdown select by jQuery.
https://github.com/fatalxiao/jq-select
jq-select jquery
Last synced: 7 days ago
JSON representation
A simple dropdown select by jQuery.
- Host: GitHub
- URL: https://github.com/fatalxiao/jq-select
- Owner: fatalxiao
- License: mit
- Created: 2016-12-29T02:38:50.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-25T08:22:44.000Z (over 7 years ago)
- Last Synced: 2024-11-09T08:29:09.351Z (2 months ago)
- Topics: jq-select, jquery
- Language: JavaScript
- Homepage: https://fatalxiao.github.io/jq-select/
- Size: 1.11 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jq-select
A simple dropdown select by jQuery.## Basic Usage
```js
$('#select').JQSelect(options);
```### Options
|Property|Type|Default|Description|
|:--|:--|:--|:--|
|multi|Boolean|false|Multi select or not.|
|group|Boolean|false|Group or not.|
|data|Object / Array|null|Object if group is true, Array if group is false. See demo for details.|
|groupPriority|Array / String|null|Group render order.|
|valueField|String|"value"|Select item value.|
|displayField|String|"label"|Select item display label.|
|iconClsField|String|"iconCls"|Select item icon class.|
|value|Object / Array|null|Default value. See demo for details.|
|iconCls|String|""|Trigger icon class.|
|noSelectText|String|"Please select ..."|Trigger display text if no item select.|
|triggerWidth|Number|200||
|popupWidth|Number / String|200|A number or 'auto'.|
|minPopupWidth|Number|200||
|maxPopupWidth|Number|400||
|hideFilter|Boolean|false||
|filterIconCls|String|""||
|filterPlaceholder|String|"filter ..."||
|keepFilter|Boolean|false|Whether keep filter text or not when close the popup.|
|hideSelectAll|Boolean|false||
|selectAllText|String|"Select All"||
|deselectAllText|String|"Deselect All"||
|checkboxIconCls|String|"jq-select-checkbox"||
|checkboxActivatedCls|String|"activated"||
|hideOKButton|Boolean|false||
|okButtonText|String|"OK"||
|hideClearButton|Boolean|false||
|clearButtonText|String|"Clear"||
|hideCloseButton|Boolean|false||
|closeButtonText|String|"Close"||
|autoClose|Boolean|false|Close the popup when select item if true.|
|autoChange|Boolean|true|Trigger change immediately when select.|
|onSelect|Function|null|Select item callback. See demo for details.|
|onDeselect|Function|null|Deselect item callback. See demo for details.|
|onChange|Function|null|Select change callback. See demo for details.|
|onOK|Function|null|OK button callback. See demo for details.|
|onClose|Function|null|Close button callback. See demo for details.|## Get Value
```js
$('#select').getValue();
```## Updating Options
```js
$('#select').JQSelect(newOptions).trigger('updateOptions');
```## Set Loading
```js
$('#select').JQSelect().trigger('loadingStart');
// do something ...
$('#select').JQSelect().trigger('loadingEnd');
```