0

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

select drop down to datalist

9th Jan 2017, 8:23 AM
Mohamed Badawy
Mohamed Badawy - avatar
5 Answers
+ 2
<select Size="10">
9th Jan 2017, 8:33 AM
ASNM
ASNM - avatar
0
Thanks :) How can we make it Multiple selection without CTRL key ?
9th Jan 2017, 9:14 AM
Mohamed Badawy
Mohamed Badawy - avatar
0
you can use multiple without size
9th Jan 2017, 9:21 AM
ASNM
ASNM - avatar
0
on click do you mean?
9th Jan 2017, 9:57 AM
ASNM
ASNM - avatar
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>
9th Jan 2017, 10:32 AM
Mohamed Badawy
Mohamed Badawy - avatar