| 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 [](http://www.jsdelivr.com/#!select2jsDelivr](http://www.jsdelivr.com/#!select2](http://www.jsdelivr.com/#!select2) or [](http://www.cdnjs.com/libraries/select2CDNJS](http://www.cdnjs.com/libraries/select2](http://www.cdnjs.com/libraries/select2), [](https://github.com/select2/select2/tagsdownload it from this GitHub repo](https://github.com/select2/select2/tags](https://github.com/select2/select2/tags), or use one of the integrations below. |
| 31 |
|
| 32 |
Integrations |
| 33 |
------------ |
| 34 |
|
| 35 |
* [](https://github.com/ivaynberg/wicket-select2Wicket-Select2](https://github.com/ivaynberg/wicket-select2](https://github.com/ivaynberg/wicket-select2) (Java / [](http://wicket.apache.orgApache Wicket](http://wicket.apache.org](http://wicket.apache.org)) |
| 36 |
* [](https://github.com/argerim/select2-railsselect2-rails](https://github.com/argerim/select2-rails](https://github.com/argerim/select2-rails) (Ruby on Rails) |
| 37 |
* [](http://angular-ui.github.io/#ui-selectAngularUI](http://angular-ui.github.io/#ui-select](http://angular-ui.github.io/#ui-select) ([](https://angularjs.org/AngularJS](https://angularjs.org/](https://angularjs.org/)) |
| 38 |
* [](https://github.com/applegrew/django-select2Django](https://github.com/applegrew/django-select2](https://github.com/applegrew/django-select2) |
| 39 |
* [](https://github.com/19Gerhard85/sfSelect2WidgetsPluginSymfony](https://github.com/19Gerhard85/sfSelect2WidgetsPlugin](https://github.com/19Gerhard85/sfSelect2WidgetsPlugin) |
| 40 |
* [](https://github.com/avocode/FormExtensionsSymfony2](https://github.com/avocode/FormExtensions](https://github.com/avocode/FormExtensions) |
| 41 |
* [](https://github.com/t0m/select2-bootstrap-cssBootstrap 2](https://github.com/t0m/select2-bootstrap-css](https://github.com/t0m/select2-bootstrap-css) and [](https://github.com/t0m/select2-bootstrap-css/tree/bootstrap3Bootstrap 3](https://github.com/t0m/select2-bootstrap-css/tree/bootstrap3](https://github.com/t0m/select2-bootstrap-css/tree/bootstrap3) (CSS skins) |
| 42 |
* [](https://github.com/nate-strauser/meteor-select2Meteor](https://github.com/nate-strauser/meteor-select2](https://github.com/nate-strauser/meteor-select2) (modern reactive JavaScript framework; + [](https://github.com/esperadomedia/meteor-select2-bootstrap3-css/Bootstrap 3 skin](https://github.com/esperadomedia/meteor-select2-bootstrap3-css/](https://github.com/esperadomedia/meteor-select2-bootstrap3-css/)) |
| 43 |
* [](https://jquery-select2.meteor.comMeteor](https://jquery-select2.meteor.com](https://jquery-select2.meteor.com) |
| 44 |
* [](http://demos.krajee.com/widgets#select2Yii 2.x](http://demos.krajee.com/widgets#select2](http://demos.krajee.com/widgets#select2) |
| 45 |
* [](https://github.com/tonybolzan/yii-select2Yii 1.x](https://github.com/tonybolzan/yii-select2](https://github.com/tonybolzan/yii-select2) |
| 46 |
* [](https://atmospherejs.com/package/jquery-select2AtmosphereJS](https://atmospherejs.com/package/jquery-select2](https://atmospherejs.com/package/jquery-select2) |
| 47 |
* [](https://github.com/iStefo/ember-select-2EmberJS](https://github.com/iStefo/ember-select-2](https://github.com/iStefo/ember-select-2) |
| 48 |
|
| 49 |
### Example Integrations |
| 50 |
|
| 51 |
* [](https://github.com/ivaynberg/select2/wiki/Knockout.js-IntegrationKnockout.js](https://github.com/ivaynberg/select2/wiki/Knockout.js-Integration](https://github.com/ivaynberg/select2/wiki/Knockout.js-Integration) |
| 52 |
* [](https://github.com/ivaynberg/select2/wiki/Socket.IO-IntegrationSocket.IO](https://github.com/ivaynberg/select2/wiki/Socket.IO-Integration](https://github.com/ivaynberg/select2/wiki/Socket.IO-Integration) |
| 53 |
* [](https://github.com/ivaynberg/select2/wiki/PHP-ExamplePHP](https://github.com/ivaynberg/select2/wiki/PHP-Example](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 [](http://select2.github.io/select2/through GitHub Pages](http://select2.github.io/select2/](http://select2.github.io/select2/) and is located within this repository in the [](https://github.com/ivaynberg/select2/tree/gh-pages`gh-pages` branch](https://github.com/ivaynberg/select2/tree/gh-pages](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:** [](https://freenode.net/Freenode](https://freenode.net/](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. |
| 116 |
|