0

is there a way I could select multiple items in multiple select dropdown without using 'ctrl'? below is my snippet which so far I tried and unfortunately not working. Any help, ideas, clues, suggestions, recommendations please?

$(document).ready(function(){
  $("#options option").click(function(){
    $(this).prop("selected",true);
  });
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<select id="options" class="form-control" multiple>
  <option value="1">option one</option>
  <option value="2">option two</option>
  <option value="3">option three</option>
  <option value="4">option four</option>
  <option value="5">option five</option>
</select>

1
  • 3
    You can just click the first value and drag down, if they're sequential, but more practically you could use any number of select plugins Commented Jan 15, 2016 at 7:54

1 Answer 1

2

You could go for a jQuery plugin solution. DEMO JSFiddle

$(function () {
    $('select').multipleSelect();
});

You can find the 'multiple select' project at GitHub

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.