Select2

THIS MONTH

$58,356

LAST MONTH

$48,356

Basic Select2

To use add select2class in select tag.

Single Select with selected menu

To use add selectedto any particuler menu.

Percentage width to Select2(Responsive)

To use add give Pertage to the selecttag.

Single Placeholder

Select2 supports displaying a placeholder value using the placeholderconfiguration 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 disabledattribute 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 minimumResultsForSearchconfiguration option. In this example,we use the value Infinityto tell Select2 to never display the search box.

Select with Icon

To use add data-iconto set icon with menu and use class select2-with-iconsin the select tag.

Multiple Select

Select2 also support for mulitple select option.The select below is declared with the multiple attribute.

Basic Multiple Select

To add use .select2class for basic select2 control and additionally use multiple="multiple"attribute for multiple select box.

Percentage width to select2(Responsive)

To use add give Pertage to the selecttag.

Disabled with select multiple

Select2 will correctly handle disabledoptions,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.

Limitation in multiple select

To use add select2-max-lengthid in select tag.

Select with Icon

To use add data-iconto set icon with menu and use class select2-with-iconsin the select tag.

Advance Options

Loading Array Data

You may use the data configuration option to load dropdown options from a local array. You can provide initial selections with array data by providing the option tag for the selected values,similar to how it would be done for a standard select.

Loading Remote Data

Select2 comes with AJAX support built in,using jQuery's AJAX methods. In this example, we can search for repositories using GitHub's API.

Language Files

Select2 can load message translations for different languages from language files. When using translations provided by Select2,you must make sure to include the translation file in your page after Select2.The language does not have to be defined when Select2 is being initialized,but instead can be defined in the [lang]attribute of any parent elements as [lang="es"].

Support template

Select2 supports custom themes using the theme option so you can style Select2 to match the rest of your application. These are using the classic theme,which matches the old look of Select2.

Templating with country Flag

To use add data-flagto set icon with menu and use class template-with-flag-iconsin the select tag.

Multiple Select Options

Support Tag

Tagging can also be used in multi-value select boxes. In the example below,we set the multiple="multiple" attribute on a Select2 control that also has tags:trueenabled.

Automatic Tokenization

The separators that should be used when tokenizing can be specified using the tokenSeparators options. select2 supports ability to add choices automatically as the user is typing into the search field.

How results are matched

When users filter down the results by entering search terms into the search box,Select2 uses an internal "matcher" to match search terms to results. You may customize the way that Select2 matches search terms by specifying a callback for the matcherconfiguration option.

RTL support with multiSelect

Select2 will work on RTL websites if the dir attribute is set on the <select>or any parents of it. You can also initialize Select2 with dir:"rtl"set.

Language Files

Select2 can load message translations for different languages from language files. When using translations provided by Select2,you must make sure to include the translation file in your page after Select2.The language does not have to be defined when Select2 is being initialized,but instead can be defined in the [lang] attribute of any parent elements as [lang="es"].

Programmatic Control

DOM single

To use add js-eventsclass in the select tag and it will fire event when you click on the select and choose any option and finally close it.

DOM multiple

To use add js-eventsclass in the select tag and it will fire event when you click on the select and choose any option and finally close it.

Programmatic access

select2 also supports for programmatic access.To create new options can be added to a Select2 control programmatically by creating a new Javascript Option object and appending it to the control

Programmatic Single

Programmatic Multiple

Color Options

Background Color

To use add class .select2-with-bgwith data-bgcolor&data-bgcolor-variationattributes for background color of control.

Menu Background Color

To use add class .select2-with-menu-bgwith data-bgcolor&data-bgcolor-variationattributes for Menu Background color.

Full Background Color

To use add class .select2-with-full-bgwith data-bgcolor&data-bgcolor-variationattributes for full select2 control background color.

Border Color

To use add class .select2-with-borderwith data-border-color&data-border-variation attributes class for Border color of control.

Multiple Select

Background Color

To use add class .select2-with-bgwith data-bgcolor&data-bgcolor-variationattributes for background color of control.

Menu Background Color

To use add class .select2-with-menu-bgwith data-bgcolor&data-bgcolor-variationattributes for Menu Background color.

Full Background Color

To use add class .select2-with-full-bgwith data-bgcolor&data-bgcolor-variationattributes for full select2 control background color.

Border Color

To use add class .select2-with-borderwith data-border-color&data-border-variation attributes class for Border color of control.
© 2020 Material Pro Admin by Reserved