Select2 jQuery Replacement For Select Boxes

Posted By : Rohit Godara | 30-May-2019

Select2 gives you an adaptable select box with help for seeking, labeling, remote data sets, unbounded looking over, and numerous other exceptionally utilized choices.


Single Select Boxes


Select2 was intended to be a trade for the standard <select> box. By default, it underpins all choices and tasks that are accessible in a standard select box, yet with included adaptability. 


Using Select2 with AMD or CommonJS loaders 


Select2 should work with most AMD-or CommonJS-consistent module loaders, including RequireJS and almond. Select2 ships with an adjusted adaptation of the UMD jQuery template that backings both CommonJS and AMD conditions. 


Configuration 


Select2 internally utilizes AMD and the r.js fabricate the device to assemble the documents situated in the dist folder. These are constructed utilizing the records in the src folder, so you can simply indicate your modules the Select2 source and load in jquery.select2 or select2/core when you need to utilize Select2. The records situated in the dist folder are additionally AMD-perfect, so you can point to that document on the off chance that you need to stack in the greater part of the default Select2 modules. 

On the off chance that you are utilizing Select2 in a fabricate environment where preexisting module names are changed during a constructing step, Select2 will be unable to discover discretionary dependencies or dialect records. You can physically set the prefixes to use for these records utilizing the amdBase and amdLanguageBase alternatives.


amdBase
Indicates the base AMD loader way to be utilized for select2 reliance resolution. This choice ordinarily doesn't should be changed, yet is accessible for circumstances where module names may change as a result of certain form environments.


amdLanguageBase
Indicates the base AMD loader dialect way to be utilized for select2 dialect record resolution. This alternative ordinarily doesn't should be changed, yet is accessible for circumstances where module names may change as a result of certain form environments.

About Author

Author Image
Rohit Godara

Rohit is always ready to face challenges and likes to work with full dedication and coordination. He is always eager to learn new technologies so as to develop his skills and knowledge.

Request for Proposal

Name is required

Comment is required

Sending message..