How To Enable And Disable Selectmenu Jquery Mobile December 14, 2023 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"); }); CopyDemoRemeber 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"); Copyand also use unique class name for the select options.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"); CopyIt didn't work. No error, just not disabling the menu. The fix was a simple # before the ID:$("#selectId").selectmenu("disable"); CopyNow it disables, no issue :) Share Post a Comment for "How To Enable And Disable Selectmenu Jquery Mobile"
Post a Comment for "How To Enable And Disable Selectmenu Jquery Mobile"