简体   繁体   English

单击后如何在SELECT多行中进行选择?

[英]How can I make an option in a SELECT multi line upon clicking on it?

I have a drop down with items in it that overflow horizontally but I want to make an option multi-line when I click it so that I can see it all. 我有一个下拉菜单,其中的项目水平溢出,但是我想在单击该选项时将其设置为多行,以便可以看到所有内容。

I can try a tool tip but I know the tool tip doesn't last long. 我可以尝试使用工具提示,但是我知道工具提示不会持续很长时间。

How can I implement this multiline idea or something similar that would work without having to introduce jquery ui and all that? 我如何实现这种多行想法或类似的工作而不必引入jquery ui和所有这些?

Theoretically this should do it 理论上应该这样做

$('#identifier').focus(function(){
    $(this).attr('multiple','multiple');
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使复选框用作多选选项? - How do I make the checkbox works as multi select option? 如何从 Angular 的多选中保存选项? - How can I save a option from multi select in Angular? 如何添加另一行以使其成为多线图? - How can i add another line to make this a multi line chart? 如何确保在单击注销按钮后用户被重定向到主页组件? - How can I make ensure upon clicking the logout button that the user gets redirected to the home component? 单击情节时如何使flot库的悬停圆圈效果保持不变? - How can I make the flot library hovering circle effect stay upon clicking the plot? 如何在使用JavaScript或jQuery选择父选项时进行选择必需的选择 - How to make select required upon parent option selected with JavaScript or jQuery 通过单击div选择多选项选择 - Selecting multi option select by clicking on div 如何使多选动态依赖于另一个多选 - How can I make a multi select dynamic dependent to another multiselect 如何从我的多选框中选择一个选项并更新我的图表? - How can I select an option from my multi-select box and update my chart? 单击所选选项的特定区域时,如何防止打开 material-ui Select 选项 - How can I prevent material-ui Select options to be opened when clicking on particular area of the selected option
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM