Basic Select2
Selection-1
Multiple Select
Multiple-1
Single Select With Placeholder
Texas
Multiple Select With Placeholder
Select
Multiple Select With Placeholder
Select fruits
Basic

Use select2() function on select element to convert it to Select 2.

Orange
Nested

Add options inside the optgroups to for group options.

Orange
Placeholder

Apply Placeholder by setting option placeholder option.

Tagging with multi-value select boxes

Set tags: true to convert select 2 in Tag mode.

Small Select2

Use data( select2) function to get container of select2.

Orange
Disabling options

Disable Select using disabled attribute.

First
Limiting the number of Tagging

Set maximumSelectionLength: 2 with tags: true to limit selectin in Tag mode.

Select or add tags