jquery-ui-selectmenu

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

与世无争的帅哥 提交于 2020-01-23 09:58:57
问题 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. 回答1: Are you aware there are two versions? https://github.com/fnagel/jquery-ui/ (old, fork of filament groups work) https:/

jQuery ui selectmenu vertical position offset (relatively to buttons in this line)

£可爱£侵袭症+ 提交于 2020-01-16 02:21:23
问题 In my form I place control elements in a line: button, select box, checkbox. It looks logically right. But since I've started using jQuery UI I see strange vertical of select box. Here's the example from jquery-ui site, a little bit shortened: https://jsfiddle.net/Tertium/z829pay7 $(function() { $( "#speed" ).selectmenu( { width: 200}); $( "#files" ).selectmenu({ width: 200}); $( "#but1" ).button(); $( "#but2" ).button(); }); Tested on jquery 1.11.2 and 1.10.2, jquery-ui: 1.11.3, all settings

How to use jquery-ui selectmenu extension methods(_renderItem, _renderMenu etc)

 ̄綄美尐妖づ 提交于 2020-01-05 13:33:09
问题 The JQuery-UI selectmenu widget has some extension methods that can be used to customize rendering/styling of the dropdown select menu. From the api docs , the following widget extension methods can be used to customize the menu: - _renderItem( ul, item ) - _renderMenu( ul, items ) What i want to achieve is, overriding the above extension methods for just one instance of the selectmenu widget, and not at a global level. The widget factory docs does have example about extending a particular

JQueryUI selectmenu - How to add more options

▼魔方 西西 提交于 2020-01-04 05:00:24
问题 Through javascript how can I add more options to a dropdown selectmenu? Currently trying the following with no luck: for (i = 0; i < json.powerDropDownItems.length; i++) { //$('#powerSelect').append($("<option></option>").attr("value", json.powerDropDownItems[i]).text(json.powerDropDownItems[i])); $('#powerSelect').selectmenu("value", "nice name"); //$('#powerSelect').appendTo("<option>" + json.powerDropDownItems[i] + "</option>"); } $('#powerSelect').selectmenu("refresh");​ UPDATE Thanks to

how set individual styles (css) for option in selectmenu (jquery-ui: selectmenu)

馋奶兔 提交于 2019-12-25 12:43:13
问题 I have a html form:select <select id = 'myselect'> <option value = '1'>1</option> <option value = '2'>2</option> ... <option value = 'N'>N</option> </select> for a beautiful drawing I use jquery-ui $('#myselect').selectmenu(); I need to box 1 had its own style how to do it? set the id, class does not work :( I think that i should do the following: 1) create html code of 'classic' select form 2) join created 'classic' select form to jquery-ui 3) find element in jquery-ui selectmenu (HOW?) 4)

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

独自空忆成欢 提交于 2019-12-21 06:58:20
问题 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

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

对着背影说爱祢 提交于 2019-12-20 07:23:34
问题 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. 回答1: 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

How to automate jQueryUI selectmenu with Selenium web driver/Selenium IDE

帅比萌擦擦* 提交于 2019-12-14 02:34:10
问题 I'm struggling to get Selenium to select an option from a select menu generated by the jQueryUI official plugin, as described in more detail below, Selenium opens the menu, and then goes for the click to select an item, closes the menu, but the option is not selected. Some background on the setup: Using Selenium IDE Firefox Plugin Using the jQueryUI SelectMenu Demo page to test on (So we can ensure the code snippet is one everyone can access, and eliminate that the selectmenu is at least

Customizing jQuery selectmenu dropdown button on after item selected?

拈花ヽ惹草 提交于 2019-12-13 20:50:08
问题 I'm looking to create a dropdown for colors that has each color as a small square next to the item. Have: Want (roughly): This version (jsfiddle) works fine for the dropdown items themselves, but I'd like the button to also update to have the colored square next to it. $.widget("custom.coloriconselectmenu", $.ui.selectmenu, { _renderItem: function (ul, item) { var li = $("<li>", {text: item.label}); var bgColorStyle = 'background-color:' + item.element.attr("data-color"); var fullStyle =

jQuery Validation on Select List themed with jQuery UI SelectMenu Plugin

雨燕双飞 提交于 2019-12-12 03:38:18
问题 This is a followup to another question; First I needed to get the validation working on a normal select list. (The first part is available here) I have a select menu that has some jQuery Validation logic on it. I am using ASP.NET MVC, so there are some custom attributes - but right now I just want the validation to work, so the attributes are not important. I managed to get that to work (actually, Gajotres solved it, not me.) Now I want to extend it into the jQuery UI selectmenu plug (plugin