Project

General

Profile

1
Select2
2
=======
3

    
4
Select2 is a jQuery-based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.
5

    
6
To get started, checkout examples and documentation at http://select2.github.io/select2/
7

    
8
Use cases
9
---------
10

    
11
* Enhancing native selects with search.
12
* Enhancing native selects with a better multi-select interface.
13
* Loading data from JavaScript: easily load items via ajax and have them searchable.
14
* Nesting optgroups: native selects only support one level of nested. Select2 does not have this restriction.
15
* Tagging: ability to add new items on the fly.
16
* Working with large, remote datasets: ability to partially load a dataset based on the search term.
17
* Paging of large datasets: easy support for loading more pages when the results are scrolled to the end.
18
* Templating: support for custom rendering of results and selections.
19

    
20
Browser compatibility
21
---------------------
22
* IE 8+
23
* Chrome 8+
24
* Firefox 10+
25
* Safari 3+
26
* Opera 10.6+
27

    
28
Usage
29
-----
30
You can source Select2 directly from a CDN like [jsDelivr](http://www.jsdelivr.com/#!select2) or [CDNJS](http://www.cdnjs.com/libraries/select2), [download it from this GitHub repo](https://github.com/select2/select2/tags), or use one of the integrations below.
31

    
32
Integrations
33
------------
34

    
35
* [Wicket-Select2](https://github.com/ivaynberg/wicket-select2) (Java / [Apache Wicket](http://wicket.apache.org))
36
* [select2-rails](https://github.com/argerim/select2-rails) (Ruby on Rails)
37
* [AngularUI](http://angular-ui.github.io/#ui-select) ([AngularJS](https://angularjs.org/))
38
* [Django](https://github.com/applegrew/django-select2)
39
* [Symfony](https://github.com/19Gerhard85/sfSelect2WidgetsPlugin)
40
* [Symfony2](https://github.com/avocode/FormExtensions)
41
* [Bootstrap 2](https://github.com/t0m/select2-bootstrap-css) and [Bootstrap 3](https://github.com/t0m/select2-bootstrap-css/tree/bootstrap3) (CSS skins)
42
* [Meteor](https://github.com/nate-strauser/meteor-select2) (modern reactive JavaScript framework; + [Bootstrap 3 skin](https://github.com/esperadomedia/meteor-select2-bootstrap3-css/))
43
* [Meteor](https://jquery-select2.meteor.com)
44
* [Yii 2.x](http://demos.krajee.com/widgets#select2)
45
* [Yii 1.x](https://github.com/tonybolzan/yii-select2)
46
* [AtmosphereJS](https://atmospherejs.com/package/jquery-select2)
47
* [EmberJS](https://github.com/iStefo/ember-select-2)
48

    
49
### Example Integrations
50

    
51
* [Knockout.js](https://github.com/ivaynberg/select2/wiki/Knockout.js-Integration)
52
* [Socket.IO](https://github.com/ivaynberg/select2/wiki/Socket.IO-Integration)
53
* [PHP](https://github.com/ivaynberg/select2/wiki/PHP-Example)
54
* [.Net MVC] (https://github.com/ivaynberg/select2/wiki/.Net-MVC-Example)
55

    
56
Internationalization (i18n)
57
---------------------------
58

    
59
Select2 supports multiple languages by simply including the right language JS
60
file (`select2_locale_it.js`, `select2_locale_nl.js`, etc.) after `select2.js`.
61

    
62
Missing a language? Just copy `select2_locale_en.js.template`, translate
63
it, and make a pull request back to Select2 here on GitHub.
64

    
65
Documentation
66
-------------
67

    
68
The documentation for Select2 is available [through GitHub Pages](http://select2.github.io/select2/) and is located within this repository in the [`gh-pages` branch](https://github.com/ivaynberg/select2/tree/gh-pages).
69

    
70
Community
71
---------
72

    
73
### Bug tracker
74

    
75
Have a bug? Please create an issue here on GitHub!
76

    
77
https://github.com/ivaynberg/select2/issues
78

    
79
### Mailing list
80

    
81
Have a question? Ask on our mailing list!
82

    
83
select2@googlegroups.com
84

    
85
https://groups.google.com/d/forum/select2
86

    
87
### IRC channel
88

    
89
Need help implementing Select2 in your project? Ask in our IRC channel!
90

    
91
**Network:** [Freenode](https://freenode.net/) (`chat.freenode.net`)
92

    
93
**Channel:** `#select2`
94

    
95
**Web access:** https://webchat.freenode.net/?channels=select2
96

    
97
Copyright and license
98
---------------------
99

    
100
Copyright 2015 Igor Vaynberg
101

    
102
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
103
General Public License version 2 (the "GPL License"). You may choose either license to govern your
104
use of this software only upon the condition that you accept all of the terms of either the Apache
105
License or the GPL License.
106

    
107
You may obtain a copy of the Apache License and the GPL License in the LICENSE file, or at:
108

    
109
http://www.apache.org/licenses/LICENSE-2.0
110
http://www.gnu.org/licenses/gpl-2.0.html
111

    
112
Unless required by applicable law or agreed to in writing, software distributed under the Apache License
113
or the GPL License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
114
either express or implied. See the Apache License and the GPL License for the specific language governing
115
permissions and limitations under the Apache License and the GPL License.
(3-3/62)