select-menu

jquery selectMenu refresh doesn't work

好久不见. 提交于 2019-12-06 14:57:08
I have a selectMenu that I initialized and later I want to populate it with some data: $.each(data, function (Key, Value) { $('#ddlReportFarms').append($("<option></option>") .attr("value", Value.ID) .text(Value.Name)); }); $('#ddlReportFarms').selectmenu('refresh', true); this doesn't work for some reason, the new items are not display. if I do this instead of the refresh: $('#ddlReportFarms').selectmenu(); the items are displayed, but when this happens again, the selectMenu duplicates itself (appears twice) and becomes buggy.. anyone? thanks Igal I believe you have to do it like this: [...

jQuery Mobile 1.1.1 Custom Select Menu - Placeholder Text not Visible

假如想象 提交于 2019-12-01 17:27:21
After upgrading to jQuery Mobile 1.1.1 earlier today (7/13/2012) I noticed that all of my Custom Select menus no longer show the placeholder text on page load. Is there something I need to do differently in 1.1.1 to show the placeholder text in custom select menus? Help!?!? Here's a sample of my code: <div data-role="fieldcontain" class="ui-hide-label no-field-separator"> <label for="ceiling" class="select" data-theme="a">Ceiling</label> <select name="ceiling" id="ceiling" data-theme="a" data-native-menu="false" class="required"> <option data-placeholder="true">Ceiling (Yes/No)</option>

How to handle jQuery UI Selectmenu change event

丶灬走出姿态 提交于 2019-11-27 20:39:03
i use jquery ui select menu with custom render option how i can handle the change event ? i try $('#filesA').on('change', function() { alert( 'x'); }); but its not working with jQuery UI Selectmenu and also i try $( "#filesA" ).selectmenu({ change: function( event, ui ) {} }); it's working but it's create another select menu instance !! my js code $( document ).ready(function() { $( "#filesA" ).selectmenu({ change: function( event, ui ) { alert('x'); }}); $.widget( "custom.iconselectmenu", $.ui.selectmenu, { _renderItem: function( ul, item ) { var li = $( "<li>", { text: item.label } ); if (