Select2 jQuery Replacement For Select Boxes
Posted By : Rohit Godara | 30-May-2019
Select2 gives you an adaptable select box with help for seeking,
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.
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
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.