How To Enable And Disable Selectmenu JQuery Mobile August 11, 2022 Post a Comment I have a form that use jquery mobile to generate. I have a dropdown list that initially set to be disabled. Solution 1: Just do : $(document).ready(function(){ $("select.edit-projectinput").selectmenu("enable"); }); Copy Demo Remeber than there will be 2 items with the class .edit-projectinput one the real select that is converted to select menu widget and then the one default selected span element in the widget, so just specifically select the one that matters. Your menu is already initialized just a matter of calling enable method on it. Solution 2: You have to intialize selectmenu first, $(".edit-projectinput").selectmenu().selectmenu("enable"); Copy and also use unique class name for the select options.Baca JugaCatch Javascript Customevent By Jquery On() Preserving Custom Properties At First "level"Css Flexbox Display IssueDeny Direct Access To Javascript Files In Iis Web Server Solution 3: I know this is an older post, but came across the same issue in my code and found the issue, so posting here for others. Everything I saw online said to use: $("selectId").selectmenu("disable"); Copy It didn't work. No error, just not disabling the menu. The fix was a simple # before the ID: $("#selectId").selectmenu("disable"); Copy Now it disables, no issue :) Share You may like these postsJqm Pagebeforechange And Event SourceAppending Html With Jquery But Don't Get StyleJquery Mobile Multiple Html Files Vs Multiple PageJquery Mobile Popup Is Not Closing Post a Comment for "How To Enable And Disable Selectmenu JQuery Mobile"
Post a Comment for "How To Enable And Disable Selectmenu JQuery Mobile"