jquery-ui-selectmenu

Transfer data attributes from option tags to UI selectmenu items

狂风中的少年 提交于 2019-12-11 01:54:56
问题 I need to transfer all data-attributes from option tags to to UI selectmenu items (li tags). How do this with API ? <select class="select" id="" name="PROPERTY[126]"> <option value="315" data-filter="flat">Квартира</option> <option value="316" data-show="standart" data-filter="room">Комната</option> <option value="317" data-filter="house" data-hide="standart flat room uchastok" data-show="house zarub elite">Коттедж</option> <option value="318" data-filter="uchastok" data-show="zarub uchastok

Uncaught Error: no such method 'value' for selectmenu widget instance

[亡魂溺海] 提交于 2019-12-05 20:32:35
I've installed the 1.10 version of jQuery and I am getting this error when trying to set the value as the way I've always done so with the selectmenu widget. Error: Uncaught Error: no such method 'value' for selectmenu widget instance $('select.widthOpts').selectmenu('value', wDims.feet); I also receive the same error when attempting to set the index of the selectmenu. fnagel Are you aware there are two versions? https://github.com/fnagel/jquery-ui/ (old, fork of filament groups work) https://github.com/jquery/jquery-ui/tree/selectmenu (new, official) The new one does not have value or index

How to select an option in a jQuery ui selectmenu dynamically?

一个人想着一个人 提交于 2019-12-03 22:32:25
After changing a menu from a regular select to a jQuery selectmenu, I can no longer select options in it programatically. Is there a way to do this? The code to select is (assuming ListId is the actual Id of the list) $('#ListId').val(value); The plugin is activited like this: $("#ListId").selectmenu({ style: "dropdown", width:140 }); Is there a way to select an item in the select menu? Calling the same .val(value) function just selects the value in the hidden original select list, not the nicely styled jQuery selectmenu. Brandon Joyce $('#ListId').selectmenu("value", value); Assuming that you

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

落爺英雄遲暮 提交于 2019-12-02 12:36:55
I've been trying to do this by setting the size attribute of the source select element, but it's being ignored. There doesn't seem to any height setting option for the widget. Is it possible? The widget is currently working inside a div dialog that has overflow hidden, so the drop-down (26 items, always) just disappears off the div. 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