Multiple list selection without pressing CTRL

I thought it would be easy to do, but I cannot find a way.

I have a ListBox with select mode set to multiple, but I want you to be able to select multiple items without pressing CTRL.

Does anyone know an easy way to do this?

+4
source share
1 answer

I looked for it and found the following: http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/

Here are a few pointers:

Type Only:

$(function(){ $("select").multiselect(); }); 

Of course, you need to reference jQuery as well, and css to make it look good.

What the widget does is that it takes a selection list and turns it on, creating a list of checkboxes around it and stylishly them.

A simple jsfiddle example I compiled: http://jsfiddle.net/AFVfQ/1/

This is not ideal, but it should show you how it works. Pay attention to the resources on the left, I am referring to jquery ui css and the theme.

+3
source

Source: https://habr.com/ru/post/1398603/


All Articles