Basic Select2
To use add select2 class in select tag.
Single Select with selected menu
To use add selected to any particuler menu.
Percentage width to Select2(Responsive)
To use add give Pertage to the
select tag.
Single Placeholder
Select2 supports displaying a placeholder value using the
placeholder configuration option. The placeholder
value will be displayed until a selection is made.
Disabled Select2
Select2 will correctly handle disabled options, both with data coming from a
standard select (when the
disabled attribute is set) and from remote sources,
where the object has disabled: true set.
Hiding Search Element
Select2 allows you to hide the search box using the
minimumResultsForSearch
configuration option. In this example, we use the value
Infinity to tell Select2 to never display the search
box.
Select with Icon
To use add data-icon to set icon with menu and use
class select2-with-icons in the select tag.
Multiple Select
Select2 also support for mulitple select option.The select below is declared with the multiple attribute.