How can we change the select dropdown to display all options of the select tag ? | SoloLearn: Learn to code for FREE!

0

How can we change the select dropdown to display all options of the select tag ?

select drop down to datalist

1/9/2017 8:23:42 AM

Mohamed Badawy

5 Answers

New Answer

+1

<select Size="10">

0

Thanks :) How can we make it Multiple selection without CTRL key ?

0

you can use multiple without size

0

on click do you mean?

0

Thanks :) Multiple attribute you must click CTRL to select multiple options The following code does what i need. http://jsfiddle.net/techfoobar/xQqbR/ <html> <body> <select multiple="multiple"> <option id="1">Opt</option> <option id="2">Opt</option> <option id="3">Opt</option> <option id="4">Opt</option> </select> <body> </html> <script> $('option').mousedown(function(e) { e.preventDefault(); $(this).prop('selected', $(this).prop('selected') ? false : true); return false; }); </script>