Multiselect with Sort Option – HTML Component

By default, multi-selection and sorting is not possible in a single HTML component. But the following component allows the user to select multiple options from a list of values as well as sort the selected options.

Advantages: 

  1. Can be used with any HTML webpage.
  2. Built with HTML5 and supports latest jQuery version.
  3. Built with bootstrap 3.4, hence completely responsive.
  4. Component can be reused with minimal coding.

Steps to use the component: 

Step 1 : Download the HTML file and js file from the following link.

https://drive.google.com/drive/folders/1B1VbwqN544WVaMCR3bw7ZmJihzqMCqGX?usp=sharing

Step 2 : If you run the html file, you will get the following output.

multiselect_plugin

Step 3 : To get the selected item values, use the following code. It will return a comma separated values of the selected options.

getvalue(‘multiselectlist’) /*give your component id*/

Step 4 : To add more multiselect components in the same page, use same HTML code in the body tag with different id for the container.