Is it possible to limit the height of a selectmenu widget with jQuery UI?

落爺英雄遲暮 提交于 2019-12-02 12:36:55

There is no size similar option in jQuery UI Selectmenu (aka show more than just a button but a select "pane"). But it's possible to change the height of the generated button by CSS.

Another idea would be changing the rendering mechanism like @Michael proposed.

A demo fiddle would be useful. When your actual issue is the overflow of the div you could try to add the menu to another element by using the appendTo option, see http://api.jqueryui.com/selectmenu/#option-appendTo

How about some css...

.ui-selectmenu-open{
        max-height: 350px;
        overflow-y: scroll;
    }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!