1

I have a multi select select box here in this fiddle drawn as,

<select id="select" multiple>
    <option value="-1">Select</option>
    <option value="1">a</option>
    <option value="2">b</option>
    <option value="3">c</option>
    <option value="4">d</option>
</select>

How can I select multiple values without pressing Ctrl key. ie, when I select an option, if it's not selected already should be selected and vice versa.

EDIT:
1. Also how can I style that multi select dropdown such that it can be displayed as similar as a single select dropdown.

2. I tried using the above example and sample is here: http://jsfiddle.net/mpsbhat/ua057y5t/. But in this case I cant able to fire the change event then.

Community
  • 1
  • 1
mpsbhat
  • 2,703
  • 10
  • 45
  • 103
  • 1
    Might require JS, but this post discusses it: http://stackoverflow.com/questions/8641729/how-to-avoid-the-need-for-ctrl-click-in-a-multi-select-box-using-javascript – Alex Nov 03 '14 at 07:49

3 Answers3

1

You are probably searching for smething like this, check discusion: jquery select and unselect multiple input without ctrl click

Community
  • 1
  • 1
3y3skill3r
  • 899
  • 1
  • 9
  • 31
1

Check this JQuery plugin :- " Multi select avoiding ctrl button "

Hope this will help you.

Rushee
  • 684
  • 7
  • 18
1
  1. For multi-select without holding CTRL(Windows)/CMD(Mac), try this solution.

  2. For styling, you might be looking for:

    -webkit-appearance: none;/* Safari, Chrome */
    -moz-appearance: none;/* Firefox */
    

but then you need to style it yourself, background-color, font-size, etc.

Community
  • 1
  • 1
evilReiko
  • 18,034
  • 23
  • 80
  • 97