Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fklingler/jquery-touch-multiselect
jQuery plugin to have a touch-fitted multi select input field.
https://github.com/fklingler/jquery-touch-multiselect
Last synced: 2 months ago
JSON representation
jQuery plugin to have a touch-fitted multi select input field.
- Host: GitHub
- URL: https://github.com/fklingler/jquery-touch-multiselect
- Owner: fklingler
- License: mit
- Created: 2012-04-13T12:23:49.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2014-01-30T01:12:32.000Z (almost 11 years ago)
- Last Synced: 2023-03-22T19:32:39.154Z (almost 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 292 KB
- Stars: 11
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This jQuery plugin is able to transform a classic `````` input field of a form into a nice foldable list with easily selected elements, even for a touch device like a smartphone.
You can look at the demo folder to watch a working use of this plugin.
Usage
-----You can simply use this plugin by creating a standard `````` list :
```html
Option 1
Option 2
Java
Option 4```
Then in a javascript script, you can simply use this function :
```javascript
$('select').touchMultiSelect();
```Parameters
----------Some parameters can be passed to the function to customize the behavior of the plugin :
- __noneButtonPresent__
Determines if a 'none' button must be included in the list
_default value : true_- __noneButtonText__
Determines the text of the 'none' button if there is one
_default value : 'None'_- __noneButtonAtBeginning__
Determines if the 'none' button must be prepended (true) or appended (false) to the list
_default value : true_- __permitNoSelectedButton__
If there is no 'none' button, determines if we can deselect an option if there is no other selected option
_default value : false_- __maximumNumberSelections__
Limits how many options can be selected; default is no limitation (null)
_default value : null_### Example
```javascript
$('select').touchMultiSelect({
noneButtonPresent: false,
permitNoSelectedButton: true
});
```Information
-----------This plugin has been made as a part of my work at [Novelys](https://github.com/novelys).
License
-------MIT License. Copyright 2012 Novelys.