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.Baca JugaHow Do I Store Multiple Jquery Selectors In A Javascript Variable?Event Listener For Input's Value Change Through Changing With .val() In Jquery?Selecting A Default Value In An R Plotly Plot Using A Selectize Box Via Crosstalk In R, Using Static Html Not ShinySolution 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 You may like these postsHow Can I Wrap Inner Divs That Are Dynamic?Track/observe Textbox Value ChangedImage On Html Canvas Can't Be DownloadedSetting Local Variable In A Javascript Callback Function Post a Comment for "How To Enable And Disable Selectmenu Jquery Mobile"
Post a Comment for "How To Enable And Disable Selectmenu Jquery Mobile"