- September 23, 2019
- Posted by: Sibi Elamparithi
- Category: Technology
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:
- Can be used with any HTML webpage.
- Built with HTML5 and supports latest jQuery version.
- Built with bootstrap 3.4, hence completely responsive.
- 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.
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.